akhuang added inline comments.
================ Comment at: clang/lib/CodeGen/CodeGenModule.cpp:3590-3593 + getTarget().getCXXABI().isMicrosoft() && + llvm::any_of(cast<CXXMethodDecl>(FD)->parameters(), [&](ParmVarDecl *P) { + return isInAllocaArgument(getCXXABI(), P->getType()); + })) { ---------------- rnk wrote: > For simplicity, what if we always emitted the call operator for all lambda > static invokers into the IR first? So, this logic would then become almost > exactly the same as the emitCXXStructor logic above. > > Later, in EmitLambdaStaticInvokeBody, we can detect the inalloca case and > start the cloning. > For simplicity, what if we always emitted the call operator for all lambda > static invokers into the IR first? So, this logic would then become almost > exactly the same as the emitCXXStructor logic above. Do you know where this should happen? I couldn't really figure out a place other than here for emitting the call operator. If I do the cloning inside the normal EmitLambdaStaticInvokeBody path it's a bit annoying because StartFunction/EndFunction get called before/after cloning. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136998/new/ https://reviews.llvm.org/D136998 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits