diff --git a/clang/include/clang/Format/Format.h b/clang/include/clang/Format/Format.h index 75654875414f..b4d99f07545a 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 diff --git a/clang/include/clang/Tooling/Inclusions/HeaderIncludes.h b/clang/include/clang/Tooling/Core/HeaderIncludes.h similarity index 96% rename from clang/include/clang/Tooling/Inclusions/HeaderIncludes.h rename to clang/include/clang/Tooling/Core/HeaderIncludes.h index d99a3283168c..1aaa3de441f6 100644 --- a/clang/include/clang/Tooling/Inclusions/HeaderIncludes.h +++ b/clang/include/clang/Tooling/Core/HeaderIncludes.h @@ -7,12 +7,12 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_TOOLING_INCLUSIONS_HEADERINCLUDES_H -#define LLVM_CLANG_TOOLING_INCLUSIONS_HEADERINCLUDES_H +#ifndef LLVM_CLANG_TOOLING_CORE_HEADERINCLUDES_H +#define LLVM_CLANG_TOOLING_CORE_HEADERINCLUDES_H #include "clang/Basic/SourceManager.h" #include "clang/Tooling/Core/Replacement.h" -#include "clang/Tooling/Inclusions/IncludeStyle.h" +#include "clang/Tooling/Core/IncludeStyle.h" #include "llvm/Support/Path.h" #include "llvm/Support/Regex.h" #include @@ -134,4 +134,4 @@ private: } // namespace tooling } // namespace clang -#endif // LLVM_CLANG_TOOLING_INCLUSIONS_HEADERINCLUDES_H +#endif // LLVM_CLANG_TOOLING_CORE_HEADERINCLUDES_H diff --git a/clang/include/clang/Tooling/Inclusions/IncludeStyle.h b/clang/include/clang/Tooling/Core/IncludeStyle.h similarity index 96% rename from clang/include/clang/Tooling/Inclusions/IncludeStyle.h rename to clang/include/clang/Tooling/Core/IncludeStyle.h index 42d6e1a5cf16..ed7bd08ce0c5 100644 --- a/clang/include/clang/Tooling/Inclusions/IncludeStyle.h +++ b/clang/include/clang/Tooling/Core/IncludeStyle.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_TOOLING_INCLUSIONS_INCLUDESTYLE_H -#define LLVM_CLANG_TOOLING_INCLUSIONS_INCLUDESTYLE_H +#ifndef LLVM_CLANG_TOOLING_CORE_INCLUDESTYLE_H +#define LLVM_CLANG_TOOLING_CORE_INCLUDESTYLE_H #include "llvm/Support/YAMLTraits.h" #include @@ -130,4 +130,4 @@ struct ScalarEnumerationTraits< } // namespace yaml } // namespace llvm -#endif // LLVM_CLANG_TOOLING_INCLUSIONS_INCLUDESTYLE_H +#endif // LLVM_CLANG_TOOLING_CORE_INCLUDESTYLE_H diff --git a/clang/include/clang/module.modulemap b/clang/include/clang/module.modulemap index 28df963120b5..4097ad2dc716 100644 --- a/clang/include/clang/module.modulemap +++ b/clang/include/clang/module.modulemap @@ -153,8 +153,3 @@ module Clang_ToolingCore { requires cplusplus umbrella "Tooling/Core" module * { export * } } - -module Clang_ToolingInclusions { - requires cplusplus - umbrella "Tooling/Inclusions" module * { export * } -} diff --git a/clang/lib/Format/CMakeLists.txt b/clang/lib/Format/CMakeLists.txt index 0019d045cd06..42e6d53d9fe6 100644 --- a/clang/lib/Format/CMakeLists.txt +++ b/clang/lib/Format/CMakeLists.txt @@ -20,5 +20,4 @@ add_clang_library(clangFormat clangBasic clangLex clangToolingCore - clangToolingInclusions ) diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index d1a5dc8e6c69..c6de92b3cafe 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/Inclusions/HeaderIncludes.h" +#include "clang/Tooling/Core/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 031d8b51dec4..eaae49b431fb 100644 --- a/clang/lib/Tooling/CMakeLists.txt +++ b/clang/lib/Tooling/CMakeLists.txt @@ -4,7 +4,6 @@ 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 f7f423c52228..84d17984b429 100644 --- a/clang/lib/Tooling/Core/CMakeLists.txt +++ b/clang/lib/Tooling/Core/CMakeLists.txt @@ -2,6 +2,8 @@ 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/HeaderIncludes.cpp b/clang/lib/Tooling/Core/HeaderIncludes.cpp similarity index 99% rename from clang/lib/Tooling/Inclusions/HeaderIncludes.cpp rename to clang/lib/Tooling/Core/HeaderIncludes.cpp index 99c0866a6855..d974d16f01c0 100644 --- a/clang/lib/Tooling/Inclusions/HeaderIncludes.cpp +++ b/clang/lib/Tooling/Core/HeaderIncludes.cpp @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/Tooling/Inclusions/HeaderIncludes.h" +#include "clang/Tooling/Core/HeaderIncludes.h" #include "clang/Basic/SourceManager.h" #include "clang/Lex/Lexer.h" diff --git a/clang/lib/Tooling/Inclusions/IncludeStyle.cpp b/clang/lib/Tooling/Core/IncludeStyle.cpp similarity index 95% rename from clang/lib/Tooling/Inclusions/IncludeStyle.cpp rename to clang/lib/Tooling/Core/IncludeStyle.cpp index 3597710f1f6e..74eec481c288 100644 --- a/clang/lib/Tooling/Inclusions/IncludeStyle.cpp +++ b/clang/lib/Tooling/Core/IncludeStyle.cpp @@ -7,7 +7,8 @@ // //===----------------------------------------------------------------------===// -#include "clang/Tooling/Inclusions/IncludeStyle.h" +#include "clang/Tooling/Core/IncludeStyle.h" + using clang::tooling::IncludeStyle; diff --git a/clang/lib/Tooling/Inclusions/CMakeLists.txt b/clang/lib/Tooling/Inclusions/CMakeLists.txt deleted file mode 100644 index 00afb50f3a69..000000000000 --- a/clang/lib/Tooling/Inclusions/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -set(LLVM_LINK_COMPONENTS support) - -add_clang_library(clangToolingInclusions - HeaderIncludes.cpp - IncludeStyle.cpp - - LINK_LIBS - clangBasic - clangLex - clangRewrite - clangToolingCore - ) diff --git a/clang/unittests/Tooling/HeaderIncludesTest.cpp b/clang/unittests/Tooling/HeaderIncludesTest.cpp index ff68f75a6e82..4407221f8ad7 100644 --- a/clang/unittests/Tooling/HeaderIncludesTest.cpp +++ b/clang/unittests/Tooling/HeaderIncludesTest.cpp @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/Tooling/Inclusions/HeaderIncludes.h" +#include "clang/Tooling/Core/HeaderIncludes.h" #include "../Tooling/ReplacementTest.h" #include "../Tooling/RewriterTestContext.h" #include "clang/Format/Format.h"