[clang] [AArch64] Stack probing for function prologues (PR #66524)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 25 11:27:53 PDT 2023


================
@@ -97,14 +97,45 @@ AArch64FunctionInfo::AArch64FunctionInfo(const Function &F,
     if (const auto *BTE = mdconst::extract_or_null<ConstantInt>(
             F.getParent()->getModuleFlag("branch-target-enforcement")))
       BranchTargetEnforcement = BTE->getZExtValue();
-    return;
+  } else {
+    const StringRef BTIEnable =
+        F.getFnAttribute("branch-target-enforcement").getValueAsString();
+    assert(BTIEnable.equals_insensitive("true") ||
+           BTIEnable.equals_insensitive("false"));
----------------
efriedma-quic wrote:

Is this something the verifier checks?  If it isn't, we can't assert it.

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


More information about the cfe-commits mailing list