timshen added inline comments.
================ Comment at: llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp:423 + +class AARGetter { + FunctionAnalysisManager &AM; ---------------- mehdi_amini wrote: > Can't you do it with a lambda? I can, except that AAR needs to be allocated outside of the lambda, on the stack: Optional<AAResults> AAR; auto F = [&AAR](Function &) -> AAResults& { ... }; (AAR can't be captured by value, since AAResults is not copyable) this way AAR out-lives the lambda, and I feel less readable. https://reviews.llvm.org/D33525 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits