ports/lang/flang/driver/patches/patch-lib_CodeGen_CGCall_cpp

13 lines
498 B
Text

Index: lib/CodeGen/CGCall.cpp
--- lib/CodeGen/CGCall.cpp.orig
+++ lib/CodeGen/CGCall.cpp
@@ -1958,6 +1958,9 @@ void CodeGenModule::ConstructAttributeList(
FuncAttrs.addAttribute("disable-tail-calls",
llvm::toStringRef(DisableTailCalls));
GetCPUAndFeaturesAttributes(CalleeInfo.getCalleeDecl(), FuncAttrs);
+
+ if (CodeGenOpts.ReturnProtector)
+ FuncAttrs.addAttribute("ret-protector");
}
ClangToLLVMArgMapping IRFunctionArgs(getContext(), FI);