diff options
author | Eric Liu <ioeric@google.com> | 2018-05-18 14:16:37 +0000 |
---|---|---|
committer | Eric Liu <ioeric@google.com> | 2018-05-18 14:16:37 +0000 |
commit | e0a3f5b1a9651bb4f76651d5a70d10cdb3fb9dc0 (patch) | |
tree | ed37bbb1df0c1e54cae20c0a8d54f61f27e46f12 | |
parent | 1237095b3c973e6e7d8a0cc5c27ee439507caa49 (diff) | |
download | bcm5719-llvm-e0a3f5b1a9651bb4f76651d5a70d10cdb3fb9dc0.tar.gz bcm5719-llvm-e0a3f5b1a9651bb4f76651d5a70d10cdb3fb9dc0.zip |
Move #include manipulation code to new lib/Tooling/Inclusions.
Summary:
clangToolingCore is linked into almost everything (incl. clang), but
not few tools need #include manipulation at this point. So pull this into a
separate library in Tooling.
Reviewers: ilya-biryukov
Subscribers: klimek, mgorny, cfe-commits, thakis
Differential Revision: https://reviews.llvm.org/D47068
llvm-svn: 332720
-rw-r--r-- | clang/include/clang/Format/Format.h | 2 | ||||
-rw-r--r-- | clang/include/clang/Tooling/Inclusions/HeaderIncludes.h (renamed from clang/include/clang/Tooling/Core/HeaderIncludes.h) | 8 | ||||
-rw-r--r-- | clang/include/clang/Tooling/Inclusions/IncludeStyle.h (renamed from clang/include/clang/Tooling/Core/IncludeStyle.h) | 6 | ||||
-rw-r--r-- | clang/lib/Format/CMakeLists.txt | 1 | ||||
-rw-r--r-- | clang/lib/Format/Format.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Tooling/CMakeLists.txt | 1 | ||||
-rw-r--r-- | clang/lib/Tooling/Core/CMakeLists.txt | 2 | ||||
-rw-r--r-- | clang/lib/Tooling/Inclusions/CMakeLists.txt | 12 | ||||
-rw-r--r-- | clang/lib/Tooling/Inclusions/HeaderIncludes.cpp (renamed from clang/lib/Tooling/Core/HeaderIncludes.cpp) | 2 | ||||
-rw-r--r-- | clang/lib/Tooling/Inclusions/IncludeStyle.cpp (renamed from clang/lib/Tooling/Core/IncludeStyle.cpp) | 3 | ||||
-rw-r--r-- | clang/unittests/Tooling/HeaderIncludesTest.cpp | 2 |
11 files changed, 26 insertions, 15 deletions
diff --git a/clang/include/clang/Format/Format.h b/clang/include/clang/Format/Format.h index b4d99f07545..75654875414 100644 --- a/clang/include/clang/Format/Format.h +++ b/clang/include/clang/Format/Format.h @@ -16,8 +16,8 @@ #define LLVM_CLANG_FORMAT_FORMAT_H #include "clang/Basic/LangOptions.h" -#include "clang/Tooling/Core/IncludeStyle.h" #include "clang/Tooling/Core/Replacement.h" +#include "clang/Tooling/Inclusions/IncludeStyle.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/Support/Regex.h" #include <system_error> diff --git a/clang/include/clang/Tooling/Core/HeaderIncludes.h b/clang/include/clang/Tooling/Inclusions/HeaderIncludes.h index 1aaa3de441f..d99a3283168 100644 --- a/clang/include/clang/Tooling/Core/HeaderIncludes.h +++ b/clang/include/clang/Tooling/Inclusions/HeaderIncludes.h @@ -7,12 +7,12 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_TOOLING_CORE_HEADERINCLUDES_H -#define LLVM_CLANG_TOOLING_CORE_HEADERINCLUDES_H +#ifndef LLVM_CLANG_TOOLING_INCLUSIONS_HEADERINCLUDES_H +#define LLVM_CLANG_TOOLING_INCLUSIONS_HEADERINCLUDES_H #include "clang/Basic/SourceManager.h" #include "clang/Tooling/Core/Replacement.h" -#include "clang/Tooling/Core/IncludeStyle.h" +#include "clang/Tooling/Inclusions/IncludeStyle.h" #include "llvm/Support/Path.h" #include "llvm/Support/Regex.h" #include <unordered_map> @@ -134,4 +134,4 @@ private: } // namespace tooling } // namespace clang -#endif // LLVM_CLANG_TOOLING_CORE_HEADERINCLUDES_H +#endif // LLVM_CLANG_TOOLING_INCLUSIONS_HEADERINCLUDES_H diff --git a/clang/include/clang/Tooling/Core/IncludeStyle.h b/clang/include/clang/Tooling/Inclusions/IncludeStyle.h index ed7bd08ce0c..42d6e1a5cf1 100644 --- a/clang/include/clang/Tooling/Core/IncludeStyle.h +++ b/clang/include/clang/Tooling/Inclusions/IncludeStyle.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_TOOLING_CORE_INCLUDESTYLE_H -#define LLVM_CLANG_TOOLING_CORE_INCLUDESTYLE_H +#ifndef LLVM_CLANG_TOOLING_INCLUSIONS_INCLUDESTYLE_H +#define LLVM_CLANG_TOOLING_INCLUSIONS_INCLUDESTYLE_H #include "llvm/Support/YAMLTraits.h" #include <string> @@ -130,4 +130,4 @@ struct ScalarEnumerationTraits< } // namespace yaml } // namespace llvm -#endif // LLVM_CLANG_TOOLING_CORE_INCLUDESTYLE_H +#endif // LLVM_CLANG_TOOLING_INCLUSIONS_INCLUDESTYLE_H diff --git a/clang/lib/Format/CMakeLists.txt b/clang/lib/Format/CMakeLists.txt index 42e6d53d9fe..0019d045cd0 100644 --- a/clang/lib/Format/CMakeLists.txt +++ b/clang/lib/Format/CMakeLists.txt @@ -20,4 +20,5 @@ add_clang_library(clangFormat clangBasic clangLex clangToolingCore + clangToolingInclusions ) diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index c6de92b3caf..d1a5dc8e6c6 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -31,7 +31,7 @@ #include "clang/Basic/SourceManager.h" #include "clang/Basic/VirtualFileSystem.h" #include "clang/Lex/Lexer.h" -#include "clang/Tooling/Core/HeaderIncludes.h" +#include "clang/Tooling/Inclusions/HeaderIncludes.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Allocator.h" diff --git a/clang/lib/Tooling/CMakeLists.txt b/clang/lib/Tooling/CMakeLists.txt index eaae49b431f..031d8b51dec 100644 --- a/clang/lib/Tooling/CMakeLists.txt +++ b/clang/lib/Tooling/CMakeLists.txt @@ -4,6 +4,7 @@ set(LLVM_LINK_COMPONENTS ) add_subdirectory(Core) +add_subdirectory(Inclusions) add_subdirectory(Refactoring) add_subdirectory(ASTDiff) diff --git a/clang/lib/Tooling/Core/CMakeLists.txt b/clang/lib/Tooling/Core/CMakeLists.txt index 84d17984b42..f7f423c5222 100644 --- a/clang/lib/Tooling/Core/CMakeLists.txt +++ b/clang/lib/Tooling/Core/CMakeLists.txt @@ -2,8 +2,6 @@ set(LLVM_LINK_COMPONENTS support) add_clang_library(clangToolingCore Diagnostic.cpp - HeaderIncludes.cpp - IncludeStyle.cpp Lookup.cpp Replacement.cpp diff --git a/clang/lib/Tooling/Inclusions/CMakeLists.txt b/clang/lib/Tooling/Inclusions/CMakeLists.txt new file mode 100644 index 00000000000..00afb50f3a6 --- /dev/null +++ b/clang/lib/Tooling/Inclusions/CMakeLists.txt @@ -0,0 +1,12 @@ +set(LLVM_LINK_COMPONENTS support) + +add_clang_library(clangToolingInclusions + HeaderIncludes.cpp + IncludeStyle.cpp + + LINK_LIBS + clangBasic + clangLex + clangRewrite + clangToolingCore + ) diff --git a/clang/lib/Tooling/Core/HeaderIncludes.cpp b/clang/lib/Tooling/Inclusions/HeaderIncludes.cpp index d974d16f01c..99c0866a685 100644 --- a/clang/lib/Tooling/Core/HeaderIncludes.cpp +++ b/clang/lib/Tooling/Inclusions/HeaderIncludes.cpp @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/Tooling/Core/HeaderIncludes.h" +#include "clang/Tooling/Inclusions/HeaderIncludes.h" #include "clang/Basic/SourceManager.h" #include "clang/Lex/Lexer.h" diff --git a/clang/lib/Tooling/Core/IncludeStyle.cpp b/clang/lib/Tooling/Inclusions/IncludeStyle.cpp index 74eec481c28..3597710f1f6 100644 --- a/clang/lib/Tooling/Core/IncludeStyle.cpp +++ b/clang/lib/Tooling/Inclusions/IncludeStyle.cpp @@ -7,8 +7,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/Tooling/Core/IncludeStyle.h" - +#include "clang/Tooling/Inclusions/IncludeStyle.h" using clang::tooling::IncludeStyle; diff --git a/clang/unittests/Tooling/HeaderIncludesTest.cpp b/clang/unittests/Tooling/HeaderIncludesTest.cpp index 4407221f8ad..ff68f75a6e8 100644 --- a/clang/unittests/Tooling/HeaderIncludesTest.cpp +++ b/clang/unittests/Tooling/HeaderIncludesTest.cpp @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/Tooling/Core/HeaderIncludes.h" +#include "clang/Tooling/Inclusions/HeaderIncludes.h" #include "../Tooling/ReplacementTest.h" #include "../Tooling/RewriterTestContext.h" #include "clang/Format/Format.h" |