1; RUN: opt -thinlto-bc -thinlto-split-lto-unit -o %t %s 2; RUN: llvm-lto2 run -r %t,f,plx -r %t,g_alias,plx -r %t,foo,lx -r %t,foo,plx -r %t,bar,lx -r %t,bar,plx -o %t1 %t 3; RUN: llvm-nm %t1.0 | FileCheck --check-prefix=MERGED %s 4; RUN: llvm-nm %t1.1 | FileCheck %s 5 6; MERGED: R __typeid_bar_global_addr 7; MERGED: R __typeid_foo_global_addr 8; CHECK: U __typeid_bar_global_addr 9; CHECK: U __typeid_foo_global_addr 10 11target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 12target triple = "x86_64-unknown-linux-gnu" 13 14@foo = global i32 0, !type !0 15@bar = global i32 0, !type !1 16 17define i1 @f(i8* %ptr) { 18 %p = call i1 @llvm.type.test(i8* %ptr, metadata !"foo") 19 ret i1 %p 20} 21 22@g_alias = alias i1 (i8*), i1 (i8*)* @g 23 24define internal i1 @g(i8* %ptr) { 25 %p = call i1 @llvm.type.test(i8* %ptr, metadata !"bar") 26 ret i1 %p 27} 28 29declare i1 @llvm.type.test(i8* %ptr, metadata %typeid) nounwind readnone 30 31!0 = !{i32 0, !"foo"} 32!1 = !{i32 0, !"bar"} 33