ssijaric added inline comments.
================ Comment at: lib/CodeGen/MicrosoftCXXABI.cpp:1058 + + // 1. For return types <= 16 bytes, use the C return semantics. + ---------------- richard.townsend.arm wrote: > Microsoft have updated the spec since this was written, it now says to check > for aggregate-ness, trivial copy, and trivial destruct, instead of POD. This is only true for aggregates. We can have non-aggregate return types that are less or equal to 16 bytes. In this case, they are returned on the stack. ================ Comment at: lib/CodeGen/MicrosoftCXXABI.cpp:1075 + uint64_t RetTySize = getContext().getTypeSize(FI.getReturnType()); + if (RetTySize <= 16) + return false; ---------------- The size returned is in bits, not bytes. As mentioned above, this applies to aggregates with trivial copy assignment operators and destructors. I will provide a function to check for this. At that point, the check can be removed from here, and the check below can be replaced with something like: bool isIndirectReturn = !canReturnInRegisters(); CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits