[llvm] [CFI][annotation] Leave alone function pointers in function annotations (PR #80173)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 6 00:54:07 PST 2024


================
@@ -0,0 +1,114 @@
+; RUN: opt %s -o %t.bc
+; RUN: opt -passes=lowertypetests %t.bc -o %t.o
+
+; REM: Find the `llvm.global.annotations` symbol in `%t.*.ll` and verify
+; REM: that no function annotation references CFI jump table entry.
+
+; RUN: llvm-dis %t.o -o - | FileCheck %s --check-prefix=CHECK-bar
+; CHECK-bar: {{llvm.global.annotations = .*bar, }}
+
+; RUN: llvm-dis %t.o -o - | FileCheck %s --check-prefix=CHECK-foo
+; CHECK-foo: {{llvm.global.annotations = .*foo, }}
----------------
nikic wrote:

Why do you need three different FileCheck invocations here? You should be able to match the whole llvm.global.annotations in one invocation.

The standard invocation is `RUN: opt -S -passes=lowertypetests < %s | FileCheck %s`.

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


More information about the llvm-commits mailing list