[PATCH] D21385: Adjust Registry interface to not require plugins to export a registry
John Brawn via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 15 09:03:50 PDT 2016
john.brawn created this revision.
john.brawn added reviewers: ehsan, reames, chapuni.
john.brawn added subscribers: llvm-commits, cfe-commits.
john.brawn set the repository for this revision to rL LLVM.
Herald added a subscriber: klimek.
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 8442 bytes
Desc: not available
More information about the llvm-commits