aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorTomas Matheson <tomas.matheson@arm.com>2023-12-21 18:16:30 +0000
committerTomas Matheson <tomas.matheson@arm.com>2023-12-21 18:32:55 +0000
commit7bd17212ef23a72ea224a037126d33d3e02553fe (patch)
tree2b18ccd6b94efb2fbd28687ab56b1454e91fbaf3 /clang/lib/CodeGen/CodeGenModule.cpp
parentc50de57feb2b824d789fe3bc4e0d24c5bfc266ea (diff)
downloadllvm-7bd17212ef23a72ea224a037126d33d3e02553fe.zip
llvm-7bd17212ef23a72ea224a037126d33d3e02553fe.tar.gz
llvm-7bd17212ef23a72ea224a037126d33d3e02553fe.tar.bz2
Re-land "[AArch64] Codegen support for FEAT_PAuthLR" (#75947)
This reverts commit 9f0f5587426a4ff24b240018cf8bf3acc3c566ae. Fix expensive checks failure by properly marking register def for ADR.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index b2e173d0..d78f259 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -1106,6 +1106,9 @@ void CodeGenModule::Release() {
if (LangOpts.BranchTargetEnforcement)
getModule().addModuleFlag(llvm::Module::Min, "branch-target-enforcement",
1);
+ if (LangOpts.BranchProtectionPAuthLR)
+ getModule().addModuleFlag(llvm::Module::Min, "branch-protection-pauth-lr",
+ 1);
if (LangOpts.hasSignReturnAddress())
getModule().addModuleFlag(llvm::Module::Min, "sign-return-address", 1);
if (LangOpts.isSignReturnAddressScopeAll())