From ed9b826436853e01cd5710f09877056f017e9af5 Mon Sep 17 00:00:00 2001 From: John Brawn Date: Wed, 27 Jul 2016 11:41:18 +0000 Subject: Revert r276856 "Adjust Registry interface to not require plugins to export a registry" This is causing a huge pile of buildbot failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276857 91177308-0d34-0410-b5e6-96231b3b80d8 --- examples/AnnotateFunctions/CMakeLists.txt | 2 +- examples/PrintFunctionNames/CMakeLists.txt | 2 +- include/clang/Frontend/FrontendPluginRegistry.h | 3 +++ include/clang/Lex/Preprocessor.h | 2 ++ lib/Frontend/FrontendAction.cpp | 2 +- lib/Lex/Preprocessor.cpp | 2 +- lib/Tooling/CompilationDatabase.cpp | 2 -- 7 files changed, 9 insertions(+), 6 deletions(-) diff --git a/examples/AnnotateFunctions/CMakeLists.txt b/examples/AnnotateFunctions/CMakeLists.txt index 5684abf238..cf564d527d 100644 --- a/examples/AnnotateFunctions/CMakeLists.txt +++ b/examples/AnnotateFunctions/CMakeLists.txt @@ -1,4 +1,4 @@ -add_llvm_loadable_module(AnnotateFunctions AnnotateFunctions.cpp PLUGIN_TOOL clang) +add_llvm_loadable_module(AnnotateFunctions AnnotateFunctions.cpp) if(LLVM_ENABLE_PLUGINS AND (WIN32 OR CYGWIN)) target_link_libraries(AnnotateFunctions PRIVATE diff --git a/examples/PrintFunctionNames/CMakeLists.txt b/examples/PrintFunctionNames/CMakeLists.txt index f5f818866c..5a00d5036f 100644 --- a/examples/PrintFunctionNames/CMakeLists.txt +++ b/examples/PrintFunctionNames/CMakeLists.txt @@ -9,7 +9,7 @@ if( NOT MSVC ) # MSVC mangles symbols differently, and endif() endif() -add_llvm_loadable_module(PrintFunctionNames PrintFunctionNames.cpp PLUGIN_TOOL clang) +add_llvm_loadable_module(PrintFunctionNames PrintFunctionNames.cpp) if(LLVM_ENABLE_PLUGINS AND (WIN32 OR CYGWIN)) target_link_libraries(PrintFunctionNames PRIVATE diff --git a/include/clang/Frontend/FrontendPluginRegistry.h b/include/clang/Frontend/FrontendPluginRegistry.h index 9d7ee08d95..ecab630c12 100644 --- a/include/clang/Frontend/FrontendPluginRegistry.h +++ b/include/clang/Frontend/FrontendPluginRegistry.h @@ -13,6 +13,9 @@ #include "clang/Frontend/FrontendAction.h" #include "llvm/Support/Registry.h" +// Instantiated in FrontendAction.cpp. +extern template class llvm::Registry; + namespace clang { /// The frontend plugin registry. diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h index 4a46bb8d05..30cc37f6f8 100644 --- a/include/clang/Lex/Preprocessor.h +++ b/include/clang/Lex/Preprocessor.h @@ -1956,4 +1956,6 @@ typedef llvm::Registry PragmaHandlerRegistry; } // end namespace clang +extern template class llvm::Registry; + #endif diff --git a/lib/Frontend/FrontendAction.cpp b/lib/Frontend/FrontendAction.cpp index 2945b8925f..d2c2a80394 100644 --- a/lib/Frontend/FrontendAction.cpp +++ b/lib/Frontend/FrontendAction.cpp @@ -33,7 +33,7 @@ #include using namespace clang; -LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) +template class llvm::Registry; namespace { diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp index 6812da8212..3654ba080d 100644 --- a/lib/Lex/Preprocessor.cpp +++ b/lib/Lex/Preprocessor.cpp @@ -54,7 +54,7 @@ #include using namespace clang; -LLVM_INSTANTIATE_REGISTRY(PragmaHandlerRegistry) +template class llvm::Registry; //===----------------------------------------------------------------------===// ExternalPreprocessorSource::~ExternalPreprocessorSource() { } diff --git a/lib/Tooling/CompilationDatabase.cpp b/lib/Tooling/CompilationDatabase.cpp index 6f95bf01f6..8fc4a1fe5b 100644 --- a/lib/Tooling/CompilationDatabase.cpp +++ b/lib/Tooling/CompilationDatabase.cpp @@ -32,8 +32,6 @@ using namespace clang; using namespace tooling; -LLVM_INSTANTIATE_REGISTRY(CompilationDatabasePluginRegistry) - CompilationDatabase::~CompilationDatabase() {} std::unique_ptr -- cgit v1.2.3