[PATCH] D50152: [CodeGen] Merge equivalent block copy/helper functions

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 2 19:41:44 PDT 2018


ahatanak added inline comments.


================
Comment at: lib/CodeGen/CGBlocks.cpp:492
+        if (!RD->isExternallyVisible())
+          info.CapturesNonExternalType = true;
+
----------------
rjmccall wrote:
> You only need to do this if you're going to mangle the type name, i.e. if it's actually going to end up as a CXXRecord capture.   It should be easy enough to just set this flag above in the clauses where you recognize interesting C++ record captures.
I modified the test case in test/CodeGenObjCXX/arc-blocks.mm to check that capturing a trivial C++ class doesn't cause the helper functions to be internal. 


Repository:
  rC Clang

https://reviews.llvm.org/D50152





More information about the cfe-commits mailing list