brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · c31ece6 Raw
45 lines · plain
1; RUN: rm -rf %t && split-file %s %t2; RUN: not llvm-link -S %t/1.ll %t/1-aux.ll 2>&1 | FileCheck %s3 4; CHECK: Linking globals named 'foo': symbol multiply defined!5 6; RUN: llvm-link -S %t/2.ll %t/2-aux.ll | FileCheck %s --check-prefix=CHECK27; RUN: llvm-link -S %t/2-aux.ll %t/2.ll | FileCheck %s --check-prefix=CHECK28 9; CHECK2-DAG: @[[#]] = private global i64 0, section "data", comdat($foo)10; CHECK2-DAG: @[[#]] = private global i64 0, section "cnts", comdat($foo)11; CHECK2-DAG: @foo = hidden global i64 2, section "data", comdat, align 812; CHECK2-DAG: @bar = dso_local global i64 3, section "cnts", comdat($foo), align 1613; CHECK2-DAG: @qux = weak_odr global i64 4, comdat($foo)14; CHECK2-DAG: @fred = linkonce global i64 5, comdat($foo)15 16; RUN: llvm-link -S %t/non-var.ll %t/non-var.ll 2>&1 | FileCheck %s --check-prefix=NONVAR17 18; NONVAR: linking 'foo': non-variables in comdat nodeduplicate are not handled19 20;--- 1.ll21$foo = comdat nodeduplicate22@foo = global i64 43, comdat($foo)23 24;--- 1-aux.ll25$foo = comdat nodeduplicate26@foo = global i64 43, comdat($foo)27 28;--- 2.ll29$foo = comdat nodeduplicate30@foo = global i64 2, section "data", comdat($foo), align 831@bar = weak global i64 0, section "cnts", comdat($foo)32@qux = weak_odr global i64 4, comdat($foo)33 34;--- 2-aux.ll35$foo = comdat nodeduplicate36@foo = weak hidden global i64 0, section "data", comdat($foo)37@bar = dso_local global i64 3, section "cnts", comdat($foo), align 1638@fred = linkonce global i64 5, comdat($foo)39 40;--- non-var.ll41$foo = comdat nodeduplicate42define weak void @foo() comdat {43  ret void44}45