1; RUN: opt -thinlto-bc %s -o %t1.bc 2; RUN: llvm-lto2 run -thinlto-distributed-indexes %t1.bc -o %t.out -save-temps \ 3; RUN: -r %t1.bc,foo,plx \ 4; RUN: -r %t1.bc,bar,x \ 5; RUN: -r %t1.bc,addrtaken,px 6; RUN: llvm-bcanalyzer -dump %t.out.index.bc | FileCheck %s --check-prefix=COMBINED 7 8target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 9target triple = "x86_64-unknown-linux-gnu" 10 11define i1 @foo(i8* %p) !type !0 { 12entry: 13 %x = call i1 @llvm.type.test(i8* %p, metadata !"typeid1") 14 ret i1 %x 15} 16 17declare !type !0 i1 @bar(i8*) 18 19; Functions must be address taken to have jump table entries emitted 20define void @addrtaken(i1 %i) { 21 %1 = select i1 %i, i1(i8*)* @foo, i1(i8*)* @bar 22 ret void 23} 24 25declare i1 @llvm.type.test(i8* %ptr, metadata %type) nounwind readnone 26 27!0 = !{i64 0, !"typeid1"} 28 29; COMBINED: <GLOBALVAL_SUMMARY_BLOCK 30; COMBINED: <CFI_FUNCTION_DEFS op0=0 op1=3/> 31; COMBINED: <CFI_FUNCTION_DECLS op0=3 op1=3/> 32; COMBINED: <TYPE_ID op0=6 op1=7 op2=4 op3=7 op4=0 op5=0 op6=0 op7=0/> 33; COMBINED: </GLOBALVAL_SUMMARY_BLOCK> 34 35; COMBINED: <STRTAB_BLOCK 36; COMBINED-NEXT: <BLOB abbrevid=4/> blob data = 'foobartypeid1' 37; COMBINED-NEXT: </STRTAB_BLOCK> 38