[PATCH] D49464: [COFF, ARM64] Mark only POD-type returns as SRET
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 20 16:09:26 PDT 2018
efriedma added a comment.
Reid, are you okay with merging something like the current patch for now, and implementing returning the value as a followup?
================
Comment at: lib/CodeGen/CGCall.cpp:1989
+ const CXXRecordDecl *RD = FI.getReturnType()->getAsCXXRecordDecl();
+ if (RD && RD->isPOD())
+ SRETAttrs.addAttribute(llvm::Attribute::StructRet);
----------------
It would be better to move the isPOD check itself into target/ABI-specific code, more like setSRetAfterThis. But not important either way, I guess.
https://reviews.llvm.org/D49464
More information about the llvm-commits
mailing list