serge-sans-paille added inline comments.

================
Comment at: polly/lib/Support/RegisterPasses.cpp:727
+extern "C" ::llvm::PassPluginLibraryInfo LLVM_ATTRIBUTE_WEAK
+llvmGetPassPluginInfo() {
+  return getPassPluginInfo();
----------------
Meinersbur wrote:
> [serious] Unfortunately, the new pass manager's plugin system relies on the 
> function name to be `llvmGetPassPluginInfo` in each plugin. This works with 
> multiple dynamic libraries all declaring the same name using the 
> `PassPlugin::Load` mechanism, but linking them all statically will violate 
> the one-definition-rule.
> 
> IMHO, Polly.cpp would have been a better place for this function.
> but linking them all statically will violate the one-definition-rule.

They are unused when liked statically, and flagged as weak to avoid link-time 
conflict.

> IMHO, Polly.cpp would have been a better place for this function.
I still agree it's more explicit if linked conditionaly.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61446/new/

https://reviews.llvm.org/D61446



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to