From c907e200d4c2798ac59916bd8f7e6542f2fbe7a7 Mon Sep 17 00:00:00 2001 From: John Brawn Date: Wed, 27 Jul 2016 11:18:38 +0000 Subject: Adjust Registry interface to not require plugins to export a registry Currently the Registry class contains the vestiges of a previous attempt to allow plugins to be used on Windows without using BUILD_SHARED_LIBS, where a plugin would have its own copy of a registry and export it to be imported by the tool that's loading the plugin. This only works if the plugin is entirely self-contained with the only interface between the plugin and tool being the registry, and in particular this conflicts with how IR pass plugins work. This patch changes things so that instead the add_node function of the registry is exported by the tool and then imported by the plugin, which solves this problem and also means that instead of every plugin having to export every registry they use instead LLVM only has to export the add_node functions. This allows plugins that use a registry to work on Windows if LLVM_EXPORT_SYMBOLS_FOR_PLUGINS is used. Differential Revision: http://reviews.llvm.org/D21385 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276856 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Lex/Preprocessor.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include/clang/Lex/Preprocessor.h') diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h index 30cc37f6f8..4a46bb8d05 100644 --- a/include/clang/Lex/Preprocessor.h +++ b/include/clang/Lex/Preprocessor.h @@ -1956,6 +1956,4 @@ typedef llvm::Registry PragmaHandlerRegistry; } // end namespace clang -extern template class llvm::Registry; - #endif -- cgit v1.2.3