Skip to content

Commit ade3acc

Browse files
authored
Merge pull request #2185 from apple/PR-71957796-20200714
Add back the code I removed from addDefaultFunctionDefinitionAttributes in 04cd235
2 parents e4df607 + 9b131ef commit ade3acc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

clang/lib/CodeGen/CGCall.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1797,6 +1797,14 @@ void CodeGenModule::getDefaultFunctionAttributes(StringRef Name,
17971797
FuncAttrs.addAttribute("stackrealign");
17981798
if (CodeGenOpts.Backchain)
17991799
FuncAttrs.addAttribute("backchain");
1800+
if (CodeGenOpts.PointerAuth.ReturnAddresses)
1801+
FuncAttrs.addAttribute("ptrauth-returns");
1802+
if (CodeGenOpts.PointerAuth.FunctionPointers)
1803+
FuncAttrs.addAttribute("ptrauth-calls");
1804+
if (CodeGenOpts.PointerAuth.IndirectGotos)
1805+
FuncAttrs.addAttribute("ptrauth-indirect-gotos");
1806+
if (CodeGenOpts.PointerAuth.AuthTraps)
1807+
FuncAttrs.addAttribute("ptrauth-auth-traps");
18001808
if (CodeGenOpts.EnableSegmentedStacks)
18011809
FuncAttrs.addAttribute("split-stack");
18021810

0 commit comments

Comments
 (0)