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

via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 6 09:54:43 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, }}
+
+; RUN: llvm-dis %t.o -o - | FileCheck %s --check-prefix=CHECK-cfi
+; CHECK-cfi-NOT: {{llvm.global.annotations = .*cfi.*}}
+
+; ModuleID = 'cfi-annotation'
+source_filename = "ld-temp.o"
+target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
+target triple = "aarch64-none-linux-gnu"
----------------
yozhu wrote:

I agree this issue doesn't tie to particular host or target, but without triple specification the LLVM codegen doesn't work for this particular test before reaching the "lowertypetests" pass.

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


More information about the llvm-commits mailing list