================ @@ -523,6 +523,12 @@ void CodeGenFunction::FinishFunction(SourceLocation EndLoc) { NormalCleanupDest = Address::invalid(); } + if (getLangOpts().Coroutines && isCoroutine()) { + auto *Record = FnRetTy->getAsCXXRecordDecl(); + if (Record && Record->hasAttr<CoroAwaitElidableAttr>()) + CurFn->addFnAttr(llvm::Attribute::CoroGenNoallocRamp); + } ---------------- yuxuanchen1997 wrote:
Original intention was to not introduce extra work (for loop over usages) for non attributed code. The check won't have a quick exit path for unattributed code. 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