summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Brawn <john.brawn@arm.com>2016-07-28 17:17:22 +0000
committerJohn Brawn <john.brawn@arm.com>2016-07-28 17:17:22 +0000
commit40e6fbb0af9fcc7539f6dbf747c3ff2d0cf5a5c6 (patch)
tree60a7ef3d53ed34ecc266deeecd0c43b1c9c87960
parent394ca50fa91a04fb3df27b9352b10ba23ad5d003 (diff)
downloadclang-40e6fbb0af9fcc7539f6dbf747c3ff2d0cf5a5c6.tar.gz
Revert r276973 "Adjust Registry interface to not require plugins to export a registry"
Buildbot failures when building with clang -Werror. Reverting while I try to figure this out. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@277008 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--examples/AnnotateFunctions/CMakeLists.txt2
-rw-r--r--examples/PrintFunctionNames/CMakeLists.txt2
-rw-r--r--include/clang/Frontend/FrontendPluginRegistry.h3
-rw-r--r--include/clang/Lex/Preprocessor.h2
-rw-r--r--lib/Frontend/FrontendAction.cpp2
-rw-r--r--lib/Lex/Preprocessor.cpp2
-rw-r--r--lib/Tooling/CompilationDatabase.cpp2
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<clang::PluginASTAction>;
+
namespace clang {
/// The frontend plugin registry.
diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h
index 000df6647f..c9b712504e 100644
--- a/include/clang/Lex/Preprocessor.h
+++ b/include/clang/Lex/Preprocessor.h
@@ -1972,4 +1972,6 @@ typedef llvm::Registry<PragmaHandler> PragmaHandlerRegistry;
} // end namespace clang
+extern template class llvm::Registry<clang::PragmaHandler>;
+
#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 <system_error>
using namespace clang;
-LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry)
+template class llvm::Registry<clang::PluginASTAction>;
namespace {
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp
index f0d6872546..8832c7f80c 100644
--- a/lib/Lex/Preprocessor.cpp
+++ b/lib/Lex/Preprocessor.cpp
@@ -54,7 +54,7 @@
#include <utility>
using namespace clang;
-LLVM_INSTANTIATE_REGISTRY(PragmaHandlerRegistry)
+template class llvm::Registry<clang::PragmaHandler>;
//===----------------------------------------------------------------------===//
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<CompilationDatabase>