1 ; RUN: llvm-link -S %S/Inputs/linkage.b.ll %S/Inputs/linkage.c.ll | FileCheck %s -check-prefix=B -check-prefix=C -check-prefix=CU
2 ; RUN: llvm-link -S -only-needed %S/Inputs/linkage.b.ll %S/Inputs/linkage.c.ll | FileCheck %s -check-prefix=B -check-prefix=C -check-prefix=CN
3 ; RUN: llvm-link -S -internalize %S/Inputs/linkage.b.ll %S/Inputs/linkage.c.ll | FileCheck %s -check-prefix=B -check-prefix=CI
4 ; RUN: llvm-link -S -internalize -only-needed %S/Inputs/linkage.b.ll %S/Inputs/linkage.c.ll | FileCheck %s -check-prefix=B -check-prefix=CN
5 ; RUN: llvm-link -S -internalize %S/Inputs/linkage.b.ll %S/Inputs/linkage.c.ll %S/Inputs/linkage.d.ll | FileCheck %s -check-prefix=B -check-prefix=DI
7 C-LABEL: @X = global i32 5
8 CI-LABEL: @X = internal global i32 5
9 CU-LABEL:@U = global i32 6
10 CI-LABEL:@U = internal global i32 6
12 DI-LABEL: @Y = global i8 42
13 DI-LABEL: @llvm.used = appending global [2 x i8*] [i8* @Y, i8* bitcast (i64 ()* @foo to i8*)], section "llvm.metadata"
15 B-LABEL: define void @bar() {
17 C-LABEL: define i32 @foo()
18 CI-LABEL: define internal i32 @foo()
20 CU-LABEL:define i32 @unused() {
21 CI-LABEL:define internal i32 @unused() {
24 DI-LABEL: define internal i32 @foo.6()
25 DI-LABEL: define i64 @foo()