[PATCH] D75181: [AArch64] Handle BTI/PAC in case of generated functions.
Tamas Petz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 3 09:08:01 PDT 2020
tamas.petz added inline comments.
================
Comment at: clang/lib/CodeGen/CGCall.cpp:1827-1828
+
+ auto RASignKind = getLangOpts().getSignReturnAddressScope();
+ if (RASignKind != LangOptions::SignReturnAddressScopeKind::None) {
+ FuncAttrs.addAttribute("sign-return-address",
----------------
LangOptions has the following functions:
- hasSignReturnAddress()
- isSignReturnAddressWithAKey()
- isSignReturnAddressScopeAll()
With these functions some of these lines can be significantly reduced.
================
Comment at: clang/lib/CodeGen/CGCall.cpp:1837
+ "sign-return-address-key",
+ RASignKey == LangOptions::SignReturnAddressKeyKind::AKey ? "a_key"
+ : "b_key");
----------------
Use getLangOpts(). isSignReturnAddressWithAKey()
================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:596
+
+ LangOptions::SignReturnAddressScopeKind Scope =
+ Context.getLangOpts().getSignReturnAddressScope();
----------------
Use new functions please.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75181/new/
https://reviews.llvm.org/D75181
More information about the llvm-commits
mailing list