[PATCH] D33515: Force RegisterStandardPasses to construct std::function in the IPO library.

Frederich Munch via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 26 12:23:01 PDT 2017


marsupial added inline comments.


================
Comment at: include/llvm/Transforms/IPO/PassManagerBuilder.h:184
+  static void addGlobalExtension(ExtensionPointTy Ty, ExtensionProc Fn);
   static void addGlobalExtension(ExtensionPointTy Ty, ExtensionFn Fn);
   void addExtension(ExtensionPointTy Ty, ExtensionFn Fn);
----------------
efriedma wrote:
> Overloading like this seems a little dubious; if the ExtensionProc overload is the only one that's actually reliably usable, we shouldn't expose the ExtensionFn overload.
There is code that uses this via lambdas in LLVM.
Updated to limit RegisterStandardPasses to only accept a function pointer.


https://reviews.llvm.org/D33515





More information about the llvm-commits mailing list