blob: 1d63b7622eb38e7f15f6bd9d7652df4627f49959 [file] [log] [blame]
Peter Collingbournecb6b9202016-11-29 21:54:33 +00001; RUN: llvm-as -o %t %s
2; RUN: llvm-modextract -n 0 -o - %t | llvm-dis | FileCheck %s
3; RUN: not llvm-modextract -n 1 -o - %t 2>&1 | FileCheck --check-prefix=ERROR %s
4; RUN: llvm-modextract -b -n 0 -o - %t | llvm-dis | FileCheck %s
5; RUN: not llvm-modextract -b -n 1 -o - %t 2>&1 | FileCheck --check-prefix=ERROR %s
6
Peter Collingbourne85c2184a2016-12-01 23:13:11 +00007; RUN: llvm-modextract -n 0 -o %t0 %t
8; RUN: llvm-dis -o - %t0 | FileCheck %s
9; RUN: llvm-modextract -b -n 0 -o %t1 %t
10; RUN: llvm-dis -o - %t1 | FileCheck %s
11
Peter Collingbournecb6b9202016-11-29 21:54:33 +000012; CHECK: define void @f()
13; ERROR: llvm-modextract: error: module index out of range; bitcode file contains 1 module(s)
14
15define void @f() {
16 ret void
17}