================ @@ -899,6 +899,10 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy, if (CodeGenOpts.PointerAuth.IndirectGotos) Fn->addFnAttr("ptrauth-indirect-gotos"); + // Add return control flow integrity attributes. + if (CodeGenOpts.CFProtectionReturn) + Fn->addFnAttr("hw-shadow-stack"); + ---------------- jaidTw wrote:
Yeah nice catch, it definitely needs to check the arch https://github.com/llvm/llvm-project/pull/112477 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits