[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:08 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"
----------------
nikic wrote:

Please remove any parts of the test that are not necessary to show the issue. E.g. I doubt that things like triple and attributes are relevant.

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


More information about the llvm-commits mailing list