llvm-project/clang/lib/Frontend
John Brawn 778c3c6c61 Reapply r276856 "Adjust Registry interface to not require plugins to export a registry"
This version has two fixes compared to the original:
 * In Registry.h the template static members are instantiated before they are
   used, as clang gives an error if you do it the other way around.
 * The use of the Registry template in clang-tidy is updated in the same way as
   has been done everywhere else.

Original commit message:

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.

llvm-svn: 276973
2016-07-28 12:48:17 +00:00
..
Rewrite [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
ASTConsumers.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
ASTMerge.cpp [Frontend] Make the memory management of FrontendAction pointers explicit by using unique_ptr. 2016-02-07 19:28:36 +00:00
ASTUnit.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
CMakeLists.txt clangFrontend: Make intrinsics_gen optional for standalone build. 2016-06-02 20:24:07 +00:00
CacheTokens.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
ChainedDiagnosticConsumer.cpp
ChainedIncludesSource.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
CodeGenOptions.cpp revert SVN r265702, r265640 2016-04-08 16:52:00 +00:00
CompilerInstance.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
CompilerInvocation.cpp Add flags to toggle preservation of assembly comments 2016-07-27 19:57:40 +00:00
CreateInvocationFromCommandLine.cpp [CUDA][OpenMP] Create generic offload action 2016-07-15 23:13:27 +00:00
DependencyFile.cpp Turn copies into references as suggested by clang-tidy's performance-unnecessary-copy-initialization. 2016-05-27 13:36:58 +00:00
DependencyGraph.cpp Revert r240270 ("Fixed/added namespace ending comments using clang-tidy"). 2015-06-22 23:07:51 +00:00
DiagnosticRenderer.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
FrontendAction.cpp Reapply r276856 "Adjust Registry interface to not require plugins to export a registry" 2016-07-28 12:48:17 +00:00
FrontendActions.cpp Modules: add command line option fmodules-disable-diagnostic-validation 2016-07-26 17:12:17 +00:00
FrontendOptions.cpp Ensure that we still parse preprocessed CUDA files as CUDA when we use 2015-03-19 17:32:06 +00:00
HeaderIncludeGen.cpp [Frontend] StringRefize and fix bad indentation. 2016-05-27 12:52:19 +00:00
InitHeaderSearch.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
InitPreprocessor.cpp Provide __GLIBCXX_TYPE_INT_N_0 and __GLIBCXX_BITSIZE_INT_N_0 when in C++ gnu language extensions. 2016-07-21 07:44:41 +00:00
LangStandards.cpp [C++11] Use 'nullptr'. Frontend edition. 2014-05-22 04:46:25 +00:00
LayoutOverrideSource.cpp Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 19:38:18 +00:00
LogDiagnosticPrinter.cpp Replace double negation of !FileID.isInvalid() with FileID.isValid(). 2015-10-03 10:46:20 +00:00
ModuleDependencyCollector.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
MultiplexConsumer.cpp [OpenMP] Parse+Sema for '#pragma omp declare target' syntax version 4.5 2016-05-09 14:59:13 +00:00
PCHContainerOperations.cpp Frontend: Simplify ownership model for clang's output streams. 2016-07-15 00:55:40 +00:00
PrintPreprocessedOutput.cpp [modules] Add a comment to explain why -E leaves some #includes in the preprocessed output. 2016-04-08 01:23:59 +00:00
SerializedDiagnosticPrinter.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
SerializedDiagnosticReader.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
TestModuleFileExtension.cpp Use arrays or initializer lists to feed ArrayRefs instead of SmallVector where possible. 2016-07-02 11:41:41 +00:00
TestModuleFileExtension.h Module file extensions: pass a Sema through to the extension writer. 2015-12-08 22:43:32 +00:00
TextDiagnostic.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
TextDiagnosticBuffer.cpp Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types 2015-05-29 19:42:19 +00:00
TextDiagnosticPrinter.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
VerifyDiagnosticConsumer.cpp Refactor: Simplify boolean conditional return statements in lib/Frontend 2015-12-28 15:15:16 +00:00