Home | History | Annotate | Download | only in ThinLTOBitcodeWriter
      1 ; RUN: opt -thinlto-bc -thin-link-bitcode-file=%t2 -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 ()* }] [{ i32, void ()* } { i32 65535, void ()* @f }]
     13 
     14 ; CHECK: @g = internal global i8 42, !type !0
     15 @g = internal global i8 42, !type !0
     16 
     17 declare void @sink(i8*)
     18 
     19 ; CHECK: define internal void @f()
     20 define internal void @f() {
     21   call void @sink(i8* @g)
     22   ret void
     23 }
     24 
     25 $h = comdat any
     26 ; CHECK: define void @h() comdat
     27 define void @h() comdat {
     28   ret void
     29 }
     30 
     31 ; CHECK: !llvm.module.flags = !{![[FLAG:[0-9]+]]}
     32 ; CHECK: ![[FLAG]] = !{i32 1, !"ThinLTO", i32 0}
     33 
     34 !0 = !{i32 0, !"typeid"}
     35