Author: Alex Richardson Date: 2020-10-20T10:13:28+01:00 New Revision: a2214757e2ca445112f19395493a78e820389655
URL: https://github.com/llvm/llvm-project/commit/a2214757e2ca445112f19395493a78e820389655 DIFF: https://github.com/llvm/llvm-project/commit/a2214757e2ca445112f19395493a78e820389655.diff LOG: Move clang/Tooling/Core/Lookup.h to clang/Tooling/Refactoring/Lookup.h This allows removing the clangAST dependency from libclangToolingCore and therefore allows clang-format to be built without depending on clangAST. Before 1166 files had to be compiled for clang-format, now only 796. Reviewed By: bkramer Differential Revision: https://reviews.llvm.org/D89708 Added: clang/include/clang/Tooling/Refactoring/Lookup.h clang/lib/Tooling/Refactoring/Lookup.cpp Modified: clang/lib/Format/FormatInternal.h clang/lib/Tooling/Core/CMakeLists.txt clang/lib/Tooling/Refactoring/CMakeLists.txt clang/lib/Tooling/Refactoring/Rename/USRLocFinder.cpp clang/unittests/Tooling/LookupTest.cpp Removed: clang/include/clang/Tooling/Core/Lookup.h clang/lib/Tooling/Core/Lookup.cpp ################################################################################ diff --git a/clang/include/clang/Tooling/Core/Lookup.h b/clang/include/clang/Tooling/Refactoring/Lookup.h similarity index 93% rename from clang/include/clang/Tooling/Core/Lookup.h rename to clang/include/clang/Tooling/Refactoring/Lookup.h index 02b561c14f29..448bc422c4e7 100644 --- a/clang/include/clang/Tooling/Core/Lookup.h +++ b/clang/include/clang/Tooling/Refactoring/Lookup.h @@ -10,8 +10,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_TOOLING_CORE_LOOKUP_H -#define LLVM_CLANG_TOOLING_CORE_LOOKUP_H +#ifndef LLVM_CLANG_TOOLING_REFACTOR_LOOKUP_H +#define LLVM_CLANG_TOOLING_REFACTOR_LOOKUP_H #include "clang/Basic/LLVM.h" #include "clang/Basic/SourceLocation.h" @@ -47,4 +47,4 @@ std::string replaceNestedName(const NestedNameSpecifier *Use, } // end namespace tooling } // end namespace clang -#endif // LLVM_CLANG_TOOLING_CORE_LOOKUP_H +#endif // LLVM_CLANG_TOOLING_REFACTOR_LOOKUP_H diff --git a/clang/lib/Format/FormatInternal.h b/clang/lib/Format/FormatInternal.h index 3aa616da23d8..9043ce32e9e3 100644 --- a/clang/lib/Format/FormatInternal.h +++ b/clang/lib/Format/FormatInternal.h @@ -16,7 +16,6 @@ #define LLVM_CLANG_LIB_FORMAT_FORMATINTERNAL_H #include "BreakableToken.h" -#include "clang/Tooling/Core/Lookup.h" #include <utility> namespace clang { diff --git a/clang/lib/Tooling/Core/CMakeLists.txt b/clang/lib/Tooling/Core/CMakeLists.txt index f7f423c52228..e523ca45301e 100644 --- a/clang/lib/Tooling/Core/CMakeLists.txt +++ b/clang/lib/Tooling/Core/CMakeLists.txt @@ -2,11 +2,9 @@ set(LLVM_LINK_COMPONENTS support) add_clang_library(clangToolingCore Diagnostic.cpp - Lookup.cpp Replacement.cpp LINK_LIBS - clangAST clangBasic clangLex clangRewrite diff --git a/clang/lib/Tooling/Refactoring/CMakeLists.txt b/clang/lib/Tooling/Refactoring/CMakeLists.txt index 0565de224bbc..d3077be8810a 100644 --- a/clang/lib/Tooling/Refactoring/CMakeLists.txt +++ b/clang/lib/Tooling/Refactoring/CMakeLists.txt @@ -6,6 +6,7 @@ add_clang_library(clangToolingRefactoring AtomicChange.cpp Extract/Extract.cpp Extract/SourceExtraction.cpp + Lookup.cpp RefactoringActions.cpp Rename/RenamingAction.cpp Rename/SymbolOccurrences.cpp diff --git a/clang/lib/Tooling/Core/Lookup.cpp b/clang/lib/Tooling/Refactoring/Lookup.cpp similarity index 99% rename from clang/lib/Tooling/Core/Lookup.cpp rename to clang/lib/Tooling/Refactoring/Lookup.cpp index 712724a268fb..9468d4d032a7 100644 --- a/clang/lib/Tooling/Core/Lookup.cpp +++ b/clang/lib/Tooling/Refactoring/Lookup.cpp @@ -10,7 +10,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/Tooling/Core/Lookup.h" +#include "clang/Tooling/Refactoring/Lookup.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Decl.h" #include "clang/AST/DeclCXX.h" diff --git a/clang/lib/Tooling/Refactoring/Rename/USRLocFinder.cpp b/clang/lib/Tooling/Refactoring/Rename/USRLocFinder.cpp index dfc319dd0639..6a08c7fd5247 100644 --- a/clang/lib/Tooling/Refactoring/Rename/USRLocFinder.cpp +++ b/clang/lib/Tooling/Refactoring/Rename/USRLocFinder.cpp @@ -21,7 +21,7 @@ #include "clang/Basic/SourceLocation.h" #include "clang/Basic/SourceManager.h" #include "clang/Lex/Lexer.h" -#include "clang/Tooling/Core/Lookup.h" +#include "clang/Tooling/Refactoring/Lookup.h" #include "clang/Tooling/Refactoring/RecursiveSymbolVisitor.h" #include "clang/Tooling/Refactoring/Rename/SymbolName.h" #include "clang/Tooling/Refactoring/Rename/USRFinder.h" diff --git a/clang/unittests/Tooling/LookupTest.cpp b/clang/unittests/Tooling/LookupTest.cpp index 372cbbf62b7a..05494cb42d90 100644 --- a/clang/unittests/Tooling/LookupTest.cpp +++ b/clang/unittests/Tooling/LookupTest.cpp @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// +#include "clang/Tooling/Refactoring/Lookup.h" #include "TestVisitor.h" -#include "clang/Tooling/Core/Lookup.h" using namespace clang; namespace { _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits