================
@@ -233,6 +234,20 @@ bool ExecuteCompilerInvocation(CompilerInstance *Clang) {
 
   Clang->LoadRequestedPlugins();
 
+  // Load and store pass plugins for the back-end. Store the loaded pass 
plugins
+  // here and store references to these in CodeGenOpts to avoid pulling in the
+  // entire PassPlugin dependency chain in CodeGenOpts.
+  std::vector<std::unique_ptr<llvm::PassPlugin>> PassPlugins;
+  for (const std::string &Path : Clang->getCodeGenOpts().PassPluginNames) {
----------------
aengelke wrote:

It seems the motivation was to add pass callbacks without loading a plugin 
shared library and without recompiling Clang. This PR also almost achieves 
this, the only missing part is the ability to create a PassPlugin without 
loading a DSO (this could be easily added). (So instead of adding to 
PassBuilderCallbacks, a user would create a new DSO-less PassPlugin and push 
that to the PassPlugins list introduced here.)

https://github.com/llvm/llvm-project/pull/171868
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to