From 69d3b4f7c9fa818d2536b4f1b220b942ae392128 Mon Sep 17 00:00:00 2001 From: Dylan Noblesmith Date: Wed, 1 Feb 2012 14:25:28 +0000 Subject: [PATCH] include clang's config.h unconditionally And remove HAVE_CLANG_CONFIG_H, now that the header is generated in the autoconf build, too. (clang r149497 / llvm r149498) Also include the config.h header after all other headers, per the LLVM coding standards. It also turns out WindowsToolChain.cpp wasn't using the config header at all, so that include's just deleted now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149504 91177308-0d34-0410-b5e6-96231b3b80d8 --- CMakeLists.txt | 2 +- lib/Driver/Driver.cpp | 7 ++----- lib/Driver/ToolChains.cpp | 6 +----- lib/Driver/WindowsToolChain.cpp | 4 ---- lib/Frontend/InitHeaderSearch.cpp | 8 +++----- 5 files changed, 7 insertions(+), 20 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2087c6a8a7..bb92fee75b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -234,7 +234,7 @@ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/ PATTERN "*.inc" ) -add_definitions( -D_GNU_SOURCE -DHAVE_CLANG_CONFIG_H ) +add_definitions( -D_GNU_SOURCE ) # Clang version information set(CLANG_EXECUTABLE_VERSION diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index 7c26a0ef15..5248c2e770 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -7,10 +7,6 @@ // //===----------------------------------------------------------------------===// -#ifdef HAVE_CLANG_CONFIG_H -# include "clang/Config/config.h" -#endif - #include "clang/Driver/Driver.h" #include "clang/Driver/Action.h" @@ -27,7 +23,6 @@ #include "clang/Basic/Version.h" -#include "llvm/Config/config.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/StringSet.h" #include "llvm/ADT/OwningPtr.h" @@ -43,6 +38,8 @@ #include +#include "clang/Config/config.h" + using namespace clang::driver; using namespace clang; diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index fda72ed584..0f00f0b79e 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -9,10 +9,6 @@ #include "ToolChains.h" -#ifdef HAVE_CLANG_CONFIG_H -# include "clang/Config/config.h" -#endif - #include "clang/Driver/Arg.h" #include "clang/Driver/ArgList.h" #include "clang/Driver/Compilation.h" @@ -37,7 +33,7 @@ #include // ::getenv -#include "llvm/Config/config.h" // for CXX_INCLUDE_ROOT +#include "clang/Config/config.h" using namespace clang::driver; using namespace clang::driver::toolchains; diff --git a/lib/Driver/WindowsToolChain.cpp b/lib/Driver/WindowsToolChain.cpp index b951581e4b..8a32db2fca 100644 --- a/lib/Driver/WindowsToolChain.cpp +++ b/lib/Driver/WindowsToolChain.cpp @@ -9,10 +9,6 @@ #include "ToolChains.h" -#ifdef HAVE_CLANG_CONFIG_H -# include "clang/Config/config.h" -#endif - #include "clang/Driver/Arg.h" #include "clang/Driver/ArgList.h" #include "clang/Driver/Compilation.h" diff --git a/lib/Frontend/InitHeaderSearch.cpp b/lib/Frontend/InitHeaderSearch.cpp index e38ffb603c..2736fd885a 100644 --- a/lib/Frontend/InitHeaderSearch.cpp +++ b/lib/Frontend/InitHeaderSearch.cpp @@ -11,10 +11,6 @@ // //===----------------------------------------------------------------------===// -#ifdef HAVE_CLANG_CONFIG_H -# include "clang/Config/config.h" -#endif - #include "clang/Frontend/Utils.h" #include "clang/Basic/FileManager.h" #include "clang/Basic/LangOptions.h" @@ -29,7 +25,9 @@ #include "llvm/Support/raw_ostream.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/Path.h" -#include "llvm/Config/config.h" + +#include "clang/Config/config.h" + using namespace clang; using namespace clang::frontend; -- 2.40.0