diff options
| -rw-r--r-- | clang/tools/libclang/CIndex.cpp | 6 | ||||
| -rw-r--r-- | clang/tools/libclang/CMakeLists.txt | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp index b90da16701d..9a61560ff62 100644 --- a/clang/tools/libclang/CIndex.cpp +++ b/clang/tools/libclang/CIndex.cpp @@ -8120,4 +8120,10 @@ cxindex::Logger::~Logger() { extern volatile int ClangTidyPluginAnchorSource; static int LLVM_ATTRIBUTE_UNUSED ClangTidyPluginAnchorDestination = ClangTidyPluginAnchorSource; + +// This anchor is used to force the linker to link the clang-include-fixer +// plugin. +extern volatile int ClangIncludeFixerPluginAnchorSource; +static int LLVM_ATTRIBUTE_UNUSED ClangIncludeFixerPluginAnchorDestination = + ClangIncludeFixerPluginAnchorSource; #endif diff --git a/clang/tools/libclang/CMakeLists.txt b/clang/tools/libclang/CMakeLists.txt index 630be124660..2dd67030763 100644 --- a/clang/tools/libclang/CMakeLists.txt +++ b/clang/tools/libclang/CMakeLists.txt @@ -50,6 +50,7 @@ endif () if (TARGET clangTidyPlugin) add_definitions(-DCLANG_TOOL_EXTRA_BUILD) list(APPEND LIBS clangTidyPlugin) + list(APPEND LIBS clangIncludeFixerPlugin) endif () find_library(DL_LIBRARY_PATH dl) |

