summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2016-05-27 05:21:35 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2016-05-27 05:21:35 +0000
commit1eaa97f43912b6d4571e1397bbed9a72018e3dc4 (patch)
treee1d104c37f85d7db5a654131198670b428e8fe18 /llvm/test/tools
parent8ef190c7b0d2ebfb6ba8e7249179c4c26143d69e (diff)
downloadbcm5719-llvm-1eaa97f43912b6d4571e1397bbed9a72018e3dc4.tar.gz
bcm5719-llvm-1eaa97f43912b6d4571e1397bbed9a72018e3dc4.zip
Linker: teach the IR mover to return llvm::Error.
This will be needed in order to consistently return an Error to clients of the API being developed in D20268. Differential Revision: http://reviews.llvm.org/D20550 llvm-svn: 270967
Diffstat (limited to 'llvm/test/tools')
-rw-r--r--llvm/test/tools/gold/X86/Inputs/irmover-error.ll3
-rw-r--r--llvm/test/tools/gold/X86/irmover-error.ll9
2 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/tools/gold/X86/Inputs/irmover-error.ll b/llvm/test/tools/gold/X86/Inputs/irmover-error.ll
new file mode 100644
index 00000000000..1ed82c284a7
--- /dev/null
+++ b/llvm/test/tools/gold/X86/Inputs/irmover-error.ll
@@ -0,0 +1,3 @@
+!0 = !{ i32 1, !"foo", i32 2 }
+
+!llvm.module.flags = !{ !0 }
diff --git a/llvm/test/tools/gold/X86/irmover-error.ll b/llvm/test/tools/gold/X86/irmover-error.ll
new file mode 100644
index 00000000000..2bfbaf4e8af
--- /dev/null
+++ b/llvm/test/tools/gold/X86/irmover-error.ll
@@ -0,0 +1,9 @@
+; RUN: llvm-as -o %t1.bc %s
+; RUN: llvm-as -o %t2.bc %S/Inputs/irmover-error.ll
+; RUN: not %gold -plugin %llvmshlibdir/LLVMgold.so -o %t %t1.bc %t2.bc 2>&1 | FileCheck %s
+
+; CHECK: fatal error: Failed to link module {{.*}}2.bc: linking module flags 'foo': IDs have conflicting values
+
+!0 = !{ i32 1, !"foo", i32 1 }
+
+!llvm.module.flags = !{ !0 }
OpenPOWER on IntegriCloud