================ @@ -5443,24 +5444,38 @@ RValue CodeGenFunction::EmitRValueForField(LValue LV, //===--------------------------------------------------------------------===// RValue CodeGenFunction::EmitCallExpr(const CallExpr *E, - ReturnValueSlot ReturnValue) { + ReturnValueSlot ReturnValue, + llvm::CallBase **CallOrInvoke) { + llvm::CallBase *CallOrInvokeStorage; + if (!CallOrInvoke) { + CallOrInvoke = &CallOrInvokeStorage; + } + + auto AddCoroMustElideOnExit = llvm::make_scope_exit([&] { + if (E->isCoroMustElide()) { + auto *I = *CallOrInvoke; + if (I) + I->addFnAttr(llvm::Attribute::CoroMustElide); ---------------- ChuanqiXu9 wrote:
I agree the current style is more or less potential to scale. But I'd like to hear from @efriedma-quic since the patch changes a lot of CodeGen's functions signature and I want to know if he will be happy about this. https://github.com/llvm/llvm-project/pull/99282 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits