[PATCH] D35056: GCC ABI incompatibility when passing object with trivial copy ctor, trivial dtor, and non-trivial move ctor

Vassil Vassilev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 2 14:09:57 PDT 2017


v.g.vassilev added inline comments.


================
Comment at: lib/CodeGen/CGCXXABI.cpp:43
   if (RD->hasNonTrivialDestructor())
     return false;
 
----------------
rjmccall wrote:
> Does canPassInRegisters() not subsume all of these earlier checks?
No, if I remove them here I get a lot of test failures. I cannot move them (yet?) in Sema, because I need to call `Sema::CheckCompletedCXXClass` in `Sema::ActOnFields` to compute the triviality of the decl. Only then it would be safe move these checks in `CanPassInRegisters`.


https://reviews.llvm.org/D35056





More information about the cfe-commits mailing list