[PATCH] D27189: Bitcode: Add a more comprehensive multi-module test now that we have both llvm-cat and llvm-modextract.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 29 14:05:18 PST 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL288202: Bitcode: Add a more comprehensive multi-module test now that we have both llvm… (authored by pcc).
Changed prior to commit:
https://reviews.llvm.org/D27189?vs=79507&id=79641#toc
Repository:
rL LLVM
https://reviews.llvm.org/D27189
Files:
llvm/trunk/test/Bitcode/multi-module.ll
Index: llvm/trunk/test/Bitcode/multi-module.ll
===================================================================
--- llvm/trunk/test/Bitcode/multi-module.ll
+++ llvm/trunk/test/Bitcode/multi-module.ll
@@ -2,10 +2,11 @@
; RUN: not llvm-dis -o - %t 2>&1 | FileCheck --check-prefix=ERROR %s
; ERROR: Expected a single module
-; FIXME: Introduce a tool for extracting modules from bitcode and use it here.
-; For now we can at least check that the bitcode contains multiple modules.
; RUN: llvm-bcanalyzer -dump %t | FileCheck --check-prefix=BCA %s
+; RUN: llvm-modextract -n 0 -o - %t | llvm-dis | FileCheck --check-prefix=IR1 %s
+; RUN: llvm-modextract -n 1 -o - %t | llvm-dis | FileCheck --check-prefix=IR2 %s
+
; RUN: llvm-as -o %t1 %s
; RUN: llvm-as -o %t2 %S/Inputs/multi-module.ll
; RUN: llvm-cat -o %t %t1 %t2
@@ -16,10 +17,18 @@
; RUN: not llvm-dis -o - %t 2>&1 | FileCheck --check-prefix=ERROR %s
; RUN: llvm-bcanalyzer -dump %t | FileCheck --check-prefix=BCA %s
+; RUN: llvm-modextract -n 0 -o - %t | llvm-dis | FileCheck --check-prefix=IR1 %s
+; RUN: llvm-modextract -n 1 -o - %t | llvm-dis | FileCheck --check-prefix=IR2 %s
+
; RUN: llvm-cat -b -o %t3 %t %t
; RUN: not llvm-dis -o - %t3 2>&1 | FileCheck --check-prefix=ERROR %s
; RUN: llvm-bcanalyzer -dump %t3 | FileCheck --check-prefix=BCA4 %s
+; RUN: llvm-modextract -n 0 -o - %t3 | llvm-dis | FileCheck --check-prefix=IR1 %s
+; RUN: llvm-modextract -n 1 -o - %t3 | llvm-dis | FileCheck --check-prefix=IR2 %s
+; RUN: llvm-modextract -n 2 -o - %t3 | llvm-dis | FileCheck --check-prefix=IR1 %s
+; RUN: llvm-modextract -n 3 -o - %t3 | llvm-dis | FileCheck --check-prefix=IR2 %s
+
; BCA: <IDENTIFICATION_BLOCK
; BCA: <MODULE_BLOCK
; BCA: <IDENTIFICATION_BLOCK
@@ -34,6 +43,9 @@
; BCA4: <IDENTIFICATION_BLOCK
; BCA4: <MODULE_BLOCK
+; IR1: define void @f1()
+; IR2: define void @f2()
+
define void @f1() {
ret void
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27189.79641.patch
Type: text/x-patch
Size: 1906 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161129/2b8a91d7/attachment.bin>
More information about the llvm-commits
mailing list