31 lines · plain
1; Test to ensure that @llvm[.compiler].used is cloned to the split module for2; any globals whose defs were cloned to that module.3 4; RUN: opt -thinlto-bc -thinlto-split-lto-unit -o %t %s5; RUN: llvm-modextract -b -n 0 -o %t0.bc %t6; RUN: llvm-modextract -b -n 1 -o %t1.bc %t7; RUN: llvm-dis -o - %t0.bc | FileCheck --check-prefix=M0 %s8; RUN: llvm-dis -o - %t1.bc | FileCheck --check-prefix=M1 %s9 10; M0: @g1 = external global i811; M0: @g2 = external global i812; M0: @g3 = global i8 4213; M0: @g4 = global i8 4214; M1: @g1 = global i8 42, !type !015; M1: @g2 = global i8 42, !type !016; M1-NOT: @g17@g1 = global i8 42, !type !018@g2 = global i8 42, !type !019@g3 = global i8 4220@g4 = global i8 4221 22; M0: @llvm.used = appending global [2 x ptr] [ptr @g1, ptr @g3]23; M0: @llvm.compiler.used = appending global [2 x ptr] [ptr @g2, ptr @g4]24; M1: @llvm.used = appending global [1 x ptr] [ptr @g1]25; M1: @llvm.compiler.used = appending global [1 x ptr] [ptr @g2]26@llvm.used = appending global [2 x ptr] [ ptr @g1, ptr @g3]27@llvm.compiler.used = appending global [2 x ptr] [ ptr @g2, ptr @g4]28 29; M1: !0 = !{i32 0, !"typeid"}30!0 = !{i32 0, !"typeid"}31