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

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 2 06:52:25 PST 2024


================
@@ -0,0 +1,112 @@
+; RUN: opt %s -o %t.bc
+; RUN: llvm-lto2 run %t.bc -r %t.bc,bar,px -r %t.bc,foo,px -r %t.bc,test,px \
+; RUN: -r %t.bc,fptr1,px -r %t.bc,fptr2,px -save-temps -o %t.o
+; RUN: llvm-dis %t.*.opt.bc
+
+; REM: Find the `llvm.global.annotations` symbol in `%t.*.opt.ll` and
+; REM: verify that no function annotation references CFI jump table entry.
+
+; RUN: grep llvm.global.annotations %t.*.opt.ll > %t.annotations
+; RUN: grep bar %t.annotations
+; RUN: grep foo %t.annotations
+; RUN: not grep cfi %t.annotations
----------------
nikic wrote:

Please use FileCheck instead of grep.

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


More information about the llvm-commits mailing list