diff options
-rw-r--r-- | clang/include/clang/Config/config.h.cmake | 8 | ||||
-rw-r--r-- | clang/include/clang/Config/config.h.in | 5 | ||||
-rw-r--r-- | clang/lib/Basic/Version.cpp | 1 | ||||
-rw-r--r-- | clang/lib/Driver/Driver.cpp | 5 | ||||
-rw-r--r-- | clang/lib/Driver/ToolChains.cpp | 5 | ||||
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 3 | ||||
-rw-r--r-- | clang/lib/Rewrite/Core/Rewriter.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Tooling/Tooling.cpp | 2 | ||||
-rw-r--r-- | clang/tools/c-index-test/c-index-test.c | 2 | ||||
-rw-r--r-- | clang/tools/driver/driver.cpp | 2 | ||||
-rw-r--r-- | clang/tools/libclang/CIndex.cpp | 6 | ||||
-rw-r--r-- | clang/unittests/Basic/FileManagerTest.cpp | 2 | ||||
-rw-r--r-- | clang/unittests/Basic/SourceManagerTest.cpp | 2 | ||||
-rw-r--r-- | clang/unittests/Lex/LexerTest.cpp | 1 | ||||
-rw-r--r-- | clang/unittests/Lex/PPConditionalDirectiveRecordTest.cpp | 1 | ||||
-rw-r--r-- | clang/unittests/Tooling/ToolingTest.cpp | 2 |
16 files changed, 25 insertions, 24 deletions
diff --git a/clang/include/clang/Config/config.h.cmake b/clang/include/clang/Config/config.h.cmake index c18c4cc..8fa7a52 100644 --- a/clang/include/clang/Config/config.h.cmake +++ b/clang/include/clang/Config/config.h.cmake @@ -1,3 +1,6 @@ +#ifndef CONFIG_H +#define CONFIG_H + /* Bug report URL. */ #define BUG_REPORT_URL "${BUG_REPORT_URL}" @@ -12,3 +15,8 @@ /* Directory where gcc is installed. */ #define GCC_INSTALL_PREFIX "${GCC_INSTALL_PREFIX}" + +/* Define if we have libxml2 */ +#cmakedefine CLANG_HAVE_LIBXML ${CLANG_HAVE_LIBXML} + +#endif diff --git a/clang/include/clang/Config/config.h.in b/clang/include/clang/Config/config.h.in index 8ff9417..d66b4cf 100644 --- a/clang/include/clang/Config/config.h.in +++ b/clang/include/clang/Config/config.h.in @@ -1,5 +1,3 @@ -/* include/clang/Config/config.h.in. */ - #ifndef CONFIG_H #define CONFIG_H @@ -21,4 +19,7 @@ /* Directory where gcc is installed. */ #undef GCC_INSTALL_PREFIX +/* Define if we have libxml2 */ +#undef CLANG_HAVE_LIBXML + #endif diff --git a/clang/lib/Basic/Version.cpp b/clang/lib/Basic/Version.cpp index ae32c01..7973c5d 100644 --- a/clang/lib/Basic/Version.cpp +++ b/clang/lib/Basic/Version.cpp @@ -13,7 +13,6 @@ #include "clang/Basic/Version.h" #include "clang/Basic/LLVM.h" -#include "llvm/Config/config.h" #include "llvm/Support/raw_ostream.h" #include <cstdlib> #include <cstring> diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index a0fcf41..1d7f180 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -11,6 +11,7 @@ #include "InputInfo.h" #include "ToolChains.h" #include "clang/Basic/Version.h" +#include "clang/Config/config.h" #include "clang/Driver/Action.h" #include "clang/Driver/Compilation.h" #include "clang/Driver/DriverDiagnostic.h" @@ -37,10 +38,6 @@ #include <map> #include <memory> -// FIXME: It would prevent us from including llvm-config.h -// if config.h were included before system_error.h. -#include "clang/Config/config.h" - using namespace clang::driver; using namespace clang; using namespace llvm::opt; diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp index 8d8e7c7..dcbdd71 100644 --- a/clang/lib/Driver/ToolChains.cpp +++ b/clang/lib/Driver/ToolChains.cpp @@ -10,6 +10,7 @@ #include "ToolChains.h" #include "clang/Basic/ObjCRuntime.h" #include "clang/Basic/Version.h" +#include "clang/Config/config.h" // for GCC_INSTALL_PREFIX #include "clang/Driver/Compilation.h" #include "clang/Driver/Driver.h" #include "clang/Driver/DriverDiagnostic.h" @@ -31,10 +32,6 @@ #include "llvm/Support/raw_ostream.h" #include "llvm/Support/system_error.h" -// FIXME: This needs to be listed last until we fix the broken include guards -// in these files and the LLVM config.h files. -#include "clang/Config/config.h" // for GCC_INSTALL_PREFIX - #include <cstdlib> // ::getenv using namespace clang::driver; diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index ac20d7a..a967c0a 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -33,7 +33,6 @@ #include "clang/Serialization/ASTReader.h" #include "clang/Serialization/GlobalModuleIndex.h" #include "llvm/ADT/Statistic.h" -#include "llvm/Config/config.h" #include "llvm/Support/CrashRecoveryContext.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/Host.h" @@ -710,7 +709,9 @@ bool CompilerInstance::ExecuteAction(FrontendAction &Act) { // Validate/process some options. if (getHeaderSearchOpts().Verbose) OS << "clang -cc1 version " CLANG_VERSION_STRING +#ifdef PACKAGE_STRING << " based upon " << PACKAGE_STRING +#endif << " default target " << llvm::sys::getDefaultTargetTriple() << "\n"; if (getFrontendOpts().ShowTimers) diff --git a/clang/lib/Rewrite/Core/Rewriter.cpp b/clang/lib/Rewrite/Core/Rewriter.cpp index c0f87d2..8b17b65 100644 --- a/clang/lib/Rewrite/Core/Rewriter.cpp +++ b/clang/lib/Rewrite/Core/Rewriter.cpp @@ -21,7 +21,7 @@ #include "clang/Basic/SourceManager.h" #include "clang/Lex/Lexer.h" #include "llvm/ADT/SmallString.h" -#include "llvm/Config/config.h" +#include "llvm/Config/llvm-config.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/raw_ostream.h" using namespace clang; diff --git a/clang/lib/Tooling/Tooling.cpp b/clang/lib/Tooling/Tooling.cpp index 35e3eb4..f8247418 100644 --- a/clang/lib/Tooling/Tooling.cpp +++ b/clang/lib/Tooling/Tooling.cpp @@ -24,7 +24,7 @@ #include "clang/Tooling/ArgumentsAdjusters.h" #include "clang/Tooling/CompilationDatabase.h" #include "llvm/ADT/STLExtras.h" -#include "llvm/Config/config.h" +#include "llvm/Config/llvm-config.h" #include "llvm/Option/Option.h" #include "llvm/Support/Debug.h" #include "llvm/Support/FileSystem.h" diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c index dcae670..1d5cb14 100644 --- a/clang/tools/c-index-test/c-index-test.c +++ b/clang/tools/c-index-test/c-index-test.c @@ -1,10 +1,10 @@ /* c-index-test.c */ +#include "clang/Config/config.h" #include "clang-c/Index.h" #include "clang-c/CXCompilationDatabase.h" #include "clang-c/BuildSystem.h" #include "clang-c/Documentation.h" -#include "llvm/Config/config.h" #include <ctype.h> #include <stdlib.h> #include <stdio.h> diff --git a/clang/tools/driver/driver.cpp b/clang/tools/driver/driver.cpp index fd13555..edb32bc 100644 --- a/clang/tools/driver/driver.cpp +++ b/clang/tools/driver/driver.cpp @@ -25,7 +25,7 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/SmallVector.h" -#include "llvm/Config/config.h" +#include "llvm/Config/llvm-config.h" #include "llvm/Option/ArgList.h" #include "llvm/Option/OptTable.h" #include "llvm/Option/Option.h" diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp index 22b007e..bf54fb9 100644 --- a/clang/tools/libclang/CIndex.cpp +++ b/clang/tools/libclang/CIndex.cpp @@ -39,7 +39,7 @@ #include "llvm/ADT/Optional.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringSwitch.h" -#include "llvm/Config/config.h" +#include "llvm/Config/llvm-config.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/CrashRecoveryContext.h" #include "llvm/Support/Format.h" @@ -52,7 +52,7 @@ #include "llvm/Support/Timer.h" #include "llvm/Support/raw_ostream.h" -#if HAVE_PTHREAD_H +#ifdef __APPLE__ #include <pthread.h> #endif @@ -6962,7 +6962,7 @@ cxindex::Logger::~Logger() { OS << "[libclang:" << Name << ':'; // FIXME: Portability. -#if HAVE_PTHREAD_H && __APPLE__ +#ifdef __APPLE__ mach_port_t tid = pthread_mach_thread_np(pthread_self()); OS << tid << ':'; #endif diff --git a/clang/unittests/Basic/FileManagerTest.cpp b/clang/unittests/Basic/FileManagerTest.cpp index 9df8532..ae89395 100644 --- a/clang/unittests/Basic/FileManagerTest.cpp +++ b/clang/unittests/Basic/FileManagerTest.cpp @@ -11,7 +11,7 @@ #include "clang/Basic/FileSystemOptions.h" #include "clang/Basic/FileSystemStatCache.h" #include "gtest/gtest.h" -#include "llvm/Config/config.h" +#include "llvm/Config/llvm-config.h" using namespace llvm; using namespace clang; diff --git a/clang/unittests/Basic/SourceManagerTest.cpp b/clang/unittests/Basic/SourceManagerTest.cpp index f227d0d..3f12f47 100644 --- a/clang/unittests/Basic/SourceManagerTest.cpp +++ b/clang/unittests/Basic/SourceManagerTest.cpp @@ -20,7 +20,7 @@ #include "clang/Lex/Preprocessor.h" #include "clang/Lex/PreprocessorOptions.h" #include "llvm/ADT/SmallString.h" -#include "llvm/Config/config.h" +#include "llvm/Config/llvm-config.h" #include "gtest/gtest.h" using namespace llvm; diff --git a/clang/unittests/Lex/LexerTest.cpp b/clang/unittests/Lex/LexerTest.cpp index 3d30352..2b42f9c 100644 --- a/clang/unittests/Lex/LexerTest.cpp +++ b/clang/unittests/Lex/LexerTest.cpp @@ -20,7 +20,6 @@ #include "clang/Lex/ModuleLoader.h" #include "clang/Lex/Preprocessor.h" #include "clang/Lex/PreprocessorOptions.h" -#include "llvm/Config/config.h" #include "gtest/gtest.h" using namespace llvm; diff --git a/clang/unittests/Lex/PPConditionalDirectiveRecordTest.cpp b/clang/unittests/Lex/PPConditionalDirectiveRecordTest.cpp index f7ed8e5..1be5ece 100644 --- a/clang/unittests/Lex/PPConditionalDirectiveRecordTest.cpp +++ b/clang/unittests/Lex/PPConditionalDirectiveRecordTest.cpp @@ -20,7 +20,6 @@ #include "clang/Lex/ModuleLoader.h" #include "clang/Lex/Preprocessor.h" #include "clang/Lex/PreprocessorOptions.h" -#include "llvm/Config/config.h" #include "gtest/gtest.h" using namespace llvm; diff --git a/clang/unittests/Tooling/ToolingTest.cpp b/clang/unittests/Tooling/ToolingTest.cpp index 2d055e7..f277728 100644 --- a/clang/unittests/Tooling/ToolingTest.cpp +++ b/clang/unittests/Tooling/ToolingTest.cpp @@ -17,7 +17,7 @@ #include "clang/Tooling/CompilationDatabase.h" #include "clang/Tooling/Tooling.h" #include "llvm/ADT/STLExtras.h" -#include "llvm/Config/config.h" +#include "llvm/Config/llvm-config.h" #include "gtest/gtest.h" #include <string> |