File tree Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Expand file tree Collapse file tree 3 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -218,8 +218,12 @@ void BitcodeCompiler::add(BitcodeFile &F) {
218
218
Keep.push_back (GV);
219
219
}
220
220
221
- Mover.move (Obj->takeModule (), Keep,
222
- [](GlobalValue &, IRMover::ValueAdder) {});
221
+ if (Error E = Mover.move (Obj->takeModule (), Keep,
222
+ [](GlobalValue &, IRMover::ValueAdder) {})) {
223
+ handleAllErrors (std::move (E), [&](const llvm::ErrorInfoBase &EIB) {
224
+ fatal (" failed to link module " + F.getName () + " : " + EIB.message ());
225
+ });
226
+ }
223
227
}
224
228
225
229
static void internalize (GlobalValue &GV) {
Original file line number Diff line number Diff line change
1
+ target triple = "x86_64-unknown-linux-gnu"
2
+ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
3
+
4
+ !0 = !{ i32 1 , !"foo" , i32 2 }
5
+
6
+ !llvm.module.flags = !{ !0 }
Original file line number Diff line number Diff line change
1
+ ; RUN: llvm-as -o %t1.bc %s
2
+ ; RUN: llvm-as -o %t2.bc %S/Inputs/irmover-error.ll
3
+ ; RUN: not ld.lld -m elf_x86_64 %t1.bc %t2.bc -o %t 2>&1 | FileCheck %s
4
+
5
+ ; CHECK: failed to link module {{.*}}2.bc: linking module flags 'foo': IDs have conflicting values
6
+
7
+ target triple = "x86_64-unknown-linux-gnu"
8
+ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
9
+
10
+ !0 = !{ i32 1 , !"foo" , i32 1 }
11
+
12
+ !llvm.module.flags = !{ !0 }
You can’t perform that action at this time.
0 commit comments