[llvm] [BOLT][binary-analysis] Fix pac-ret scanner's "major limitation" (PR #136664)
Anatoly Trosinenko via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 22 05:37:55 PDT 2025
================
@@ -1,8 +1,8 @@
-# Check that llvm-bolt can handle DW_CFA_GNU_window_save on AArch64.
+# Check that llvm-bolt refuses binaries with DW_CFA_GNU_window_save on AArch64.
RUN: yaml2obj %p/Inputs/dw_cfa_gnu_window_save.yaml &> %t.exe
-RUN: llvm-bolt %t.exe -o %t.bolt 2>&1 | FileCheck %s
+RUN not: llvm-bolt %t.exe -o %t.bolt 2>&1 | FileCheck %s
----------------
atrosinenko wrote:
`not` is not a modifier of `RUN:` directive, there is a `not` helper binary built alongside other LLVM binaries - it "negates the result" of execution of the command line passed as its arguments (success vs. failure, but IIRC there is a `--crash` mode as well). Here, the command line is the result of expansion of `llvm-bolt %t.exe -o %t.bolt` - it is executed with `stdout` and `stderr` being passed through unchanged to `FileCheck`, but the return code of `llvm-bolt` is "negated".
```suggestion
RUN: not llvm-bolt %t.exe -o %t.bolt 2>&1 | FileCheck %s
```
https://github.com/llvm/llvm-project/pull/136664
More information about the llvm-commits
mailing list