Reland "Move #include manipulation code to new lib/Tooling/Inclusions."

This reverts commit r332751 (i.e. reland r332720) after fixing module
build.

Differential Revision: https://reviews.llvm.org/D47068

llvm-svn: 333532
This commit is contained in:
Eric Liu 2018-05-30 11:51:48 +00:00
parent 716515a51e
commit 4f20e9de0a
12 changed files with 31 additions and 15 deletions

View File

@ -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>

View File

@ -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

View File

@ -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

View File

@ -153,3 +153,8 @@ module Clang_ToolingCore {
requires cplusplus
umbrella "Tooling/Core" module * { export * }
}
module Clang_ToolingInclusions {
requires cplusplus
umbrella "Tooling/Inclusions" module * { export * }
}

View File

@ -20,4 +20,5 @@ add_clang_library(clangFormat
clangBasic
clangLex
clangToolingCore
clangToolingInclusions
)

View File

@ -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"

View File

@ -4,6 +4,7 @@ set(LLVM_LINK_COMPONENTS
)
add_subdirectory(Core)
add_subdirectory(Inclusions)
add_subdirectory(Refactoring)
add_subdirectory(ASTDiff)

View File

@ -2,8 +2,6 @@ set(LLVM_LINK_COMPONENTS support)
add_clang_library(clangToolingCore
Diagnostic.cpp
HeaderIncludes.cpp
IncludeStyle.cpp
Lookup.cpp
Replacement.cpp

View File

@ -0,0 +1,12 @@
set(LLVM_LINK_COMPONENTS support)
add_clang_library(clangToolingInclusions
HeaderIncludes.cpp
IncludeStyle.cpp
LINK_LIBS
clangBasic
clangLex
clangRewrite
clangToolingCore
)

View File

@ -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"

View File

@ -7,8 +7,7 @@
//
//===----------------------------------------------------------------------===//
#include "clang/Tooling/Core/IncludeStyle.h"
#include "clang/Tooling/Inclusions/IncludeStyle.h"
using clang::tooling::IncludeStyle;

View File

@ -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"