-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
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
#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.
} // end namespace clang
+extern template class llvm::Registry<clang::PragmaHandler>;
+
#endif
#include <system_error>
using namespace clang;
-LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry)
+template class llvm::Registry<clang::PluginASTAction>;
namespace {
#include <utility>
using namespace clang;
-LLVM_INSTANTIATE_REGISTRY(PragmaHandlerRegistry)
+template class llvm::Registry<clang::PragmaHandler>;
//===----------------------------------------------------------------------===//
ExternalPreprocessorSource::~ExternalPreprocessorSource() { }
using namespace clang;
using namespace tooling;
-LLVM_INSTANTIATE_REGISTRY(CompilationDatabasePluginRegistry)
-
CompilationDatabase::~CompilationDatabase() {}
std::unique_ptr<CompilationDatabase>