[llvm] [BOLT] Fix pacret-synchronous-unwind.cpp test (PR #171395)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 9 02:54:17 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-bolt
Author: Gergely Bálint (bgergely0)
<details>
<summary>Changes</summary>
The test case build a binary from C++, and checks for the number of
functions the PointerAuthCFIFixup pass runs on.
This can change based on the platform. To account for this, the patch
changes the number to a regex.
---
Full diff: https://github.com/llvm/llvm-project/pull/171395.diff
1 Files Affected:
- (modified) bolt/test/runtime/AArch64/pacret-synchronous-unwind.cpp (+5-4)
``````````diff
diff --git a/bolt/test/runtime/AArch64/pacret-synchronous-unwind.cpp b/bolt/test/runtime/AArch64/pacret-synchronous-unwind.cpp
index 1bfeeaed3715a..168a8d20fb007 100644
--- a/bolt/test/runtime/AArch64/pacret-synchronous-unwind.cpp
+++ b/bolt/test/runtime/AArch64/pacret-synchronous-unwind.cpp
@@ -11,10 +11,11 @@
// RUN: -fno-asynchronous-unwind-tables \
// RUN: %s -o %t.exe -Wl,-q
// RUN: llvm-bolt %t.exe -o %t.bolt | FileCheck %s --check-prefix=CHECK
-//
-// CHECK: PointerAuthCFIAnalyzer ran on 3 functions. Ignored
-// CHECK-NOT: 0 functions (0.00%) because of CFI inconsistencies
-// CHECK-SAME: 1 functions (33.33%) because of CFI inconsistencies
+
+// Number of functions with .cfi-negate-ra-state in the binary is
+// platform-dependent.
+// CHECK: PointerAuthCFIAnalyzer ran on {{[0-9]}} functions.
+// CHECK: Ignored 1 functions ({{[0-9.]+}}%) because of CFI inconsistencies
// CHECK-NEXT: BOLT-WARNING: PointerAuthCFIAnalyzer only supports asynchronous
// CHECK-SAME: unwind tables. For C compilers, see -fasynchronous-unwind-tables.
``````````
</details>
https://github.com/llvm/llvm-project/pull/171395
More information about the llvm-commits
mailing list