[PATCH] D137872: Try to implement lambdas with inalloca parameters by forwarding without use of inallocas.
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 22 15:55:41 PST 2022
rnk added inline comments.
================
Comment at: clang/lib/CodeGen/CGCall.cpp:727
+ if (signature.isInstanceMethod())
+ opts |= static_cast<unsigned>(FnInfoOpts::IsInstanceMethod);
+ if (signature.isChainCall())
----------------
We could avoid static_cast by defining the standard flag operators, similar to what we do in this macro:
https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/DebugInfo/CodeView/CodeView.h#L52
Alternatively, just define operator| and operator&.
================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:1190
ABIArgInfo classifyReturnType(QualType RetTy, CCState &State) const;
- ABIArgInfo classifyArgumentType(QualType RetTy, CCState &State) const;
+ ABIArgInfo classifyArgumentType(QualType RetTy, CCState &State, bool NoInAlloca) const;
----------------
Please update the old parameter name
================
Comment at: clang/lib/CodeGen/TargetInfo.cpp:1841
CGCXXABI::RecordArgABI RAA = getRecordArgABI(RT, getCXXABI());
if (RAA == CGCXXABI::RAA_Indirect) {
return getIndirectResult(Ty, false, State);
----------------
As a simplification, you can put `|| isDelegateCall` here, we're basically pretending that this returns RAA_Indirect.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137872/new/
https://reviews.llvm.org/D137872
More information about the cfe-commits
mailing list