================
@@ -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 ");
+    }
   }
 
   if (auto A = Attrs.getFnAttr("branch-target-enforcement"); A.isValid()) {
     StringRef S = A.getValueAsString();
-    if (S != "true" && S != "false")
+    if (S != "" && S != "true" && S != "false")
----------------
DanielKristofKiss wrote:

Unfortunately yes, people mixing up pre_build objects from different versions 
of the compiler.
If they IR would contain a toolchain major version that would make life simpler 
( note the auto upgrade pass in the IRMover) 


https://github.com/llvm/llvm-project/pull/82819
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to