2015-12-08 03:29:45 +01:00
|
|
|
; 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
|
|
|
|
; 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
|
|
|
|
; RUN: llvm-link -S -internalize %S/Inputs/linkage.b.ll %S/Inputs/linkage.c.ll | FileCheck %s -check-prefix=B -check-prefix=CI
|
|
|
|
; 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
|
2017-03-13 19:08:11 +01:00
|
|
|
; 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
|
2015-09-01 19:55:55 +02:00
|
|
|
|
|
|
|
C-LABEL: @X = global i32 5
|
|
|
|
CI-LABEL: @X = internal global i32 5
|
|
|
|
CU-LABEL:@U = global i32 6
|
|
|
|
CI-LABEL:@U = internal global i32 6
|
2015-10-29 22:24:38 +01:00
|
|
|
CN-NOT:@U
|
2017-03-13 19:08:11 +01:00
|
|
|
DI-LABEL: @Y = global i8 42
|
|
|
|
DI-LABEL: @llvm.used = appending global [2 x i8*] [i8* @Y, i8* bitcast (i64 ()* @foo to i8*)], section "llvm.metadata"
|
2015-09-01 19:55:55 +02:00
|
|
|
|
|
|
|
B-LABEL: define void @bar() {
|
|
|
|
|
|
|
|
C-LABEL: define i32 @foo()
|
|
|
|
CI-LABEL: define internal i32 @foo()
|
|
|
|
|
|
|
|
CU-LABEL:define i32 @unused() {
|
|
|
|
CI-LABEL:define internal i32 @unused() {
|
2015-10-29 22:24:38 +01:00
|
|
|
CN-NOT:@unused()
|
2017-03-13 19:08:11 +01:00
|
|
|
|
|
|
|
DI-LABEL: define internal i32 @foo.6()
|
|
|
|
DI-LABEL: define i64 @foo()
|