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

14 lines
498 B
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
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);