[PATCH] Some minor update in PassManager.h
Chandler Carruth
chandlerc at gmail.com
Sun Mar 29 12:16:15 PDT 2015
Sorry for not getting to this for so long. I really like the technique and I think there are a few other places wher ewe could apply it.
Can you add some doxygen comments for the utility? At some point I think we may want to pull it out of the pass manager and make it widely available in LLVM.
================
Comment at: include/llvm/IR/PassManager.h:163
@@ +162,3 @@
+template <typename R, typename C, typename A1, typename A2>
+R runImpl(C &c, R (C::*f)(A1, A2), A1 a1, A2 a2) {
+ return (c.*f)(a1, a2);
----------------
I really like this technique. I'd name it "invoke_with_optional_args" or something similar.
Also, you should use perfect forwarding here.
http://reviews.llvm.org/D3543
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list