[clang] [llvm] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

Tomas Matheson via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 22 05:21:11 PDT 2024


================
@@ -2323,15 +2323,33 @@ 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("invalid value for 'sign-return-address-key' present without "
+                  "sign-return-address ");
----------------
tmatheson-arm wrote:

```suggestion
      CheckFailed("'sign-return-address-key' present without 'sign-return-address'");
```

https://github.com/llvm/llvm-project/pull/82819


More information about the llvm-commits mailing list