rjmccall added a comment.

I'll trust Richard on the tricky Sema/AST bits.  The functionality of the patch 
looks basically acceptable to me, although I'm still not thrilled about the 
idea of actually removing the attribute from the AST rather than just letting 
it not have effect.  But we could clean that up later if it's significantly 
simpler to do it this way.

Please add a CodeGenObjCXX test case that `__weak` fields in ARC++ do actually 
override the `trivial_abi` attribute but that `__strong` fields do not.  Also, 
your test case does not seem to actually test arrays of `__weak` references.



================
Comment at: lib/CodeGen/CGDecl.cpp:1825
+    HasTrivialABIOverride =
+        RD->canPassInRegisters() && RD->hasNonTrivialDestructor();
+
----------------
You could make a helper function to do this computation and then declare it in 
some internal-to-IRGen header so that you don't write it out multiple times.


https://reviews.llvm.org/D41039



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

Reply via email to