diff options
author | Daniel Kiss <daniel.kiss@arm.com> | 2024-07-10 10:22:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-10 10:22:38 +0200 |
commit | 4b2daeccc765915d50144d03e6354c362436c3b8 (patch) | |
tree | 8df01206356c8a987520f428ce738a5f1b28e4a8 /llvm/lib/IR/Verifier.cpp | |
parent | ac285595829dde4cf435bcf5fc7a2a502d346fd4 (diff) | |
download | llvm-4b2daeccc765915d50144d03e6354c362436c3b8.zip llvm-4b2daeccc765915d50144d03e6354c362436c3b8.tar.gz llvm-4b2daeccc765915d50144d03e6354c362436c3b8.tar.bz2 |
Revert "[Clang][ARM][AArch64] Alway emit protection attributes for functions." (#98284)
Reverts llvm/llvm-project#82819
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r-- | llvm/lib/IR/Verifier.cpp | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index 3b6d76e..d156eae 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -2348,33 +2348,15 @@ void Verifier::verifyFunctionAttrs(FunctionType *FT, AttributeList Attrs, if (S != "a_key" && S != "b_key") CheckFailed("invalid value for 'sign-return-address-key' attribute: " + S, V); - if (auto AA = Attrs.getFnAttr("sign-return-address"); !AA.isValid()) { - CheckFailed( - "'sign-return-address-key' present without `sign-return-address`"); - } } if (auto A = Attrs.getFnAttr("branch-target-enforcement"); A.isValid()) { StringRef S = A.getValueAsString(); - if (S != "" && S != "true" && S != "false") + if (S != "true" && S != "false") CheckFailed( "invalid value for 'branch-target-enforcement' attribute: " + S, V); } - if (auto A = Attrs.getFnAttr("branch-protection-pauth-lr"); A.isValid()) { - StringRef S = A.getValueAsString(); - if (S != "" && S != "true" && S != "false") - CheckFailed( - "invalid value for 'branch-protection-pauth-lr' attribute: " + S, V); - } - - if (auto A = Attrs.getFnAttr("guarded-control-stack"); A.isValid()) { - StringRef S = A.getValueAsString(); - if (S != "" && S != "true" && S != "false") - CheckFailed("invalid value for 'guarded-control-stack' attribute: " + S, - V); - } - if (auto A = Attrs.getFnAttr("vector-function-abi-variant"); A.isValid()) { StringRef S = A.getValueAsString(); const std::optional<VFInfo> Info = VFABI::tryDemangleForVFABI(S, FT); |