[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 30 15:09:07 PDT 2019
rnk added inline comments.
================
Comment at: lib/CodeGen/MicrosoftCXXABI.cpp:55-56
+ bool passClassIndirect(const CXXRecordDecl *RD) const {
+ return !canCopyArgument(RD);
+ }
----------------
These are both trivial wrappers for `RD->canPassInRegisters()` which has the real logic. I would just call that to remove some indirection, even if the name is the logical opposite of the property we're trying to check.
================
Comment at: lib/CodeGen/MicrosoftCXXABI.cpp:1079
+ return true;
+ for (auto it = RD->ctor_begin(); it != RD->ctor_end(); ++it) {
+ if (it->isUserProvided())
----------------
Can this be just: `for (const CXXConstructorDecl *Ctor : RD->ctors())`?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60349/new/
https://reviews.llvm.org/D60349
More information about the cfe-commits
mailing list