[PATCH] D137872: Implement lambdas with inalloca parameters by forwarding to function without inalloca calling convention.
Eli Friedman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 14 12:00:18 PDT 2023
efriedma added inline comments.
================
Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:1472
+ // the call operator body.
+ EmitLambdaStaticInvokeBody(cast<CXXMethodDecl>(FD));
} else if (FD->isDefaulted() && isa<CXXMethodDecl>(FD) &&
----------------
akhuang wrote:
> efriedma wrote:
> > Does this pass the correct value of "this"? EmitLambdaStaticInvokeBody creates a new alloca to represent "this", but it's already an argument to the function.
> >
> > Granted, it only matters in really obscure cases, but still.
> That's true, the "this" won't be passed correctly.
>
> Actually, would it be fine to just emit the original call op body? (so that the same function body is emitted twice -- once in the call op and once in __impl).
Not completely sure what you're asking... but as I've mentioned, we can't EmitFunctionBody() the body of a function more than once.
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