[clang-tools-extra] f962daf - [include-cleaner] Fix -DBUILD_SHARED_LIBS=on build
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 17 16:56:09 PST 2022
Author: Fangrui Song
Date: 2022-11-18T00:56:04Z
New Revision: f962dafbbdf61234bfa51bde95e2e5c52a02e9b9
URL: https://github.com/llvm/llvm-project/commit/f962dafbbdf61234bfa51bde95e2e5c52a02e9b9
DIFF: https://github.com/llvm/llvm-project/commit/f962dafbbdf61234bfa51bde95e2e5c52a02e9b9.diff
LOG: [include-cleaner] Fix -DBUILD_SHARED_LIBS=on build
and apply an include-cleaner fix for the tool itself:)
addPPCallbacks requires the vtable of PPChainedCallbacks and needs a clangLex
dependency.
Added:
Modified:
clang-tools-extra/include-cleaner/tool/CMakeLists.txt
clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/include-cleaner/tool/CMakeLists.txt b/clang-tools-extra/include-cleaner/tool/CMakeLists.txt
index 3b9b03141ce1..7f68c8fc132e 100644
--- a/clang-tools-extra/include-cleaner/tool/CMakeLists.txt
+++ b/clang-tools-extra/include-cleaner/tool/CMakeLists.txt
@@ -4,6 +4,7 @@ include_directories("../lib") # FIXME: use public APIs instead.
add_clang_tool(clang-include-cleaner IncludeCleaner.cpp)
clang_target_link_libraries(clang-include-cleaner PRIVATE
clangBasic
+ clangLex
clangFrontend
clangLex
clangSerialization
diff --git a/clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp b/clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp
index 957dd9c6aab9..64ee17e56685 100644
--- a/clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp
+++ b/clang-tools-extra/include-cleaner/tool/IncludeCleaner.cpp
@@ -10,6 +10,7 @@
#include "clang-include-cleaner/Record.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Frontend/FrontendAction.h"
+#include "clang/Lex/Preprocessor.h"
#include "clang/Tooling/CommonOptionsParser.h"
#include "clang/Tooling/Tooling.h"
#include "llvm/ADT/StringRef.h"
More information about the cfe-commits
mailing list