From: Alex Richardson Date: Tue, 20 Oct 2020 07:54:07 +0000 (+0100) Subject: Move clang/Tooling/Core/Lookup.h to clang/Tooling/Refactoring/Lookup.h X-Git-Tag: llvmorg-13-init~8760 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a2214757e2ca445112f19395493a78e820389655;p=platform%2Fupstream%2Fllvm.git 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 --- 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 02b561c..448bc42 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 3aa616d..9043ce3 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 namespace clang { diff --git a/clang/lib/Tooling/Core/CMakeLists.txt b/clang/lib/Tooling/Core/CMakeLists.txt index f7f423c..e523ca4 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 0565de2..d3077be 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 712724a..9468d4d 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 dfc319d..6a08c7f 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 372cbbf..05494cb 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 {