Skip to content

Commit 23490c2

Browse files
Simplify the code.
1 parent 054515d commit 23490c2

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

clang/lib/CodeGen/CGCall.cpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2024,17 +2024,7 @@ static void getTrivialDefaultFunctionAttributes(
20242024
}
20252025

20262026
TargetInfo::BranchProtectionInfo BPI(LangOpts);
2027-
2028-
if (BPI.SignReturnAddr != LangOptions::SignReturnAddressScopeKind::None) {
2029-
FuncAttrs.addAttribute("sign-return-address", BPI.getSignReturnAddrStr());
2030-
FuncAttrs.addAttribute("sign-return-address-key", BPI.getSignKeyStr());
2031-
}
2032-
if (BPI.BranchTargetEnforcement)
2033-
FuncAttrs.addAttribute("branch-target-enforcement", "true");
2034-
if (BPI.BranchProtectionPAuthLR)
2035-
FuncAttrs.addAttribute("branch-protection-pauth-lr", "true");
2036-
if (BPI.GuardedControlStack)
2037-
FuncAttrs.addAttribute("guarded-control-stack", "true");
2027+
BPI.setFnAttributes(FuncAttrs);
20382028
}
20392029

20402030
/// Merges `target-features` from \TargetOpts and \F, and sets the result in

0 commit comments

Comments
 (0)