1; RUN: opt -S -passes=lowertypetests %s | FileCheck %s 2 3target datalayout = "e-p:64:64" 4target triple = "x86_64-unknown-linux-gnu" 5 6; CHECK: @a = global [6 x ptr] [ptr no_cfi @f1, ptr @.cfi.jumptable, ptr getelementptr inbounds ([3 x [8 x i8]], ptr @.cfi.jumptable, i64 0, i64 1), ptr no_cfi @f2, ptr @f3, ptr no_cfi @f3.cfi] 7@a = global [6 x ptr] [ptr no_cfi @f1, ptr @f1, ptr @f2, ptr no_cfi @f2, ptr @f3, ptr no_cfi @f3] 8 9; CHECK: define void @f1() 10define void @f1() !type !0 { 11 ret void 12} 13 14; CHECK: define internal void @f2() 15define internal void @f2() !type !0 { 16 ret void 17} 18 19; CHECK: define hidden void @f3.cfi() 20define void @f3() #0 !type !0 { 21 ret void 22} 23 24declare i1 @llvm.type.test(ptr %ptr, metadata %bitset) nounwind readnone 25 26define i1 @foo(ptr %p) { 27 %x = call i1 @llvm.type.test(ptr %p, metadata !"typeid1") 28 ret i1 %x 29} 30 31!llvm.module.flags = !{!1} 32 33attributes #0 = { "cfi-canonical-jump-table" } 34 35!0 = !{i32 0, !"typeid1"} 36!1 = !{i32 4, !"CFI Canonical Jump Tables", i32 0} 37