1; RUN: opt -thinlto-bc -thin-link-bitcode-file=%t2 -thinlto-split-lto-unit -o %t %s 2; RUN: llvm-dis -o - %t | FileCheck %s 3; RUN: llvm-bcanalyzer -dump %t | FileCheck --check-prefix=BCA %s 4; When not splitting the module, the thin link bitcode file should simply be a 5; copy of the regular module. 6; RUN: diff %t %t2 7 8; BCA: <FULL_LTO_GLOBALVAL_SUMMARY_BLOCK 9; BCA-NOT: <GLOBALVAL_SUMMARY_BLOCK 10 11; CHECK: @llvm.global_ctors = appending global 12@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @f, i8* null }] 13 14; CHECK: @g = internal global i8 42, !type !0 15@g = internal global i8 42, !type !0 16 17declare void @sink(i8*) 18 19; CHECK: define internal void @f() 20define internal void @f() { 21 call void @sink(i8* @g) 22 ret void 23} 24 25$h = comdat any 26; CHECK: define void @h() comdat 27define void @h() comdat { 28 ret void 29} 30 31; CHECK: !llvm.module.flags = !{![[FLAG1:[0-9]+]], ![[FLAG2:[0-9]+]]} 32; CHECK: ![[FLAG1]] = !{i32 1, !"EnableSplitLTOUnit", i32 1} 33; CHECK: ![[FLAG2]] = !{i32 1, !"ThinLTO", i32 0} 34 35!0 = !{i32 0, !"typeid"} 36