[PATCH] D20704: Update LLD for D20550.
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Thu May 26 22:28:12 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL270968: Update LLD for D20550. (authored by pcc).
Changed prior to commit:
http://reviews.llvm.org/D20704?vs=58705&id=58754#toc
Repository:
rL LLVM
http://reviews.llvm.org/D20704
Files:
lld/trunk/ELF/LTO.cpp
lld/trunk/test/ELF/lto/Inputs/irmover-error.ll
lld/trunk/test/ELF/lto/irmover-error.ll
Index: lld/trunk/ELF/LTO.cpp
===================================================================
--- lld/trunk/ELF/LTO.cpp
+++ lld/trunk/ELF/LTO.cpp
@@ -218,8 +218,12 @@
Keep.push_back(GV);
}
- Mover.move(Obj->takeModule(), Keep,
- [](GlobalValue &, IRMover::ValueAdder) {});
+ if (Error E = Mover.move(Obj->takeModule(), Keep,
+ [](GlobalValue &, IRMover::ValueAdder) {})) {
+ handleAllErrors(std::move(E), [&](const llvm::ErrorInfoBase &EIB) {
+ fatal("failed to link module " + F.getName() + ": " + EIB.message());
+ });
+ }
}
static void internalize(GlobalValue &GV) {
Index: lld/trunk/test/ELF/lto/Inputs/irmover-error.ll
===================================================================
--- lld/trunk/test/ELF/lto/Inputs/irmover-error.ll
+++ lld/trunk/test/ELF/lto/Inputs/irmover-error.ll
@@ -0,0 +1,6 @@
+target triple = "x86_64-unknown-linux-gnu"
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+
+!0 = !{ i32 1, !"foo", i32 2 }
+
+!llvm.module.flags = !{ !0 }
Index: lld/trunk/test/ELF/lto/irmover-error.ll
===================================================================
--- lld/trunk/test/ELF/lto/irmover-error.ll
+++ lld/trunk/test/ELF/lto/irmover-error.ll
@@ -0,0 +1,12 @@
+; RUN: llvm-as -o %t1.bc %s
+; RUN: llvm-as -o %t2.bc %S/Inputs/irmover-error.ll
+; RUN: not ld.lld -m elf_x86_64 %t1.bc %t2.bc -o %t 2>&1 | FileCheck %s
+
+; CHECK: failed to link module {{.*}}2.bc: linking module flags 'foo': IDs have conflicting values
+
+target triple = "x86_64-unknown-linux-gnu"
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+
+!0 = !{ i32 1, !"foo", i32 1 }
+
+!llvm.module.flags = !{ !0 }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20704.58754.patch
Type: text/x-patch
Size: 1700 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160527/eb769323/attachment.bin>
More information about the llvm-commits
mailing list