summaryrefslogtreecommitdiff
path: root/test/Other
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-01-12 10:02:02 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-01-12 10:02:02 +0000
commit83bdd1d763fca1dbe923d6f9ce5bc130c2989657 (patch)
tree25ee13913b1ad6d4d8c55c05a0fc664e1758b35d /test/Other
parente7687650c9ff5e52f572d8e70752f7c808ca707e (diff)
downloadllvm-83bdd1d763fca1dbe923d6f9ce5bc130c2989657.tar.gz
llvm-83bdd1d763fca1dbe923d6f9ce5bc130c2989657.tar.bz2
llvm-83bdd1d763fca1dbe923d6f9ce5bc130c2989657.tar.xz
[PM] Fix a bunch of bugs I spotted by inspection when working on this
code. Copious tests added to cover these cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199039 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Other')
-rw-r--r--test/Other/pass-pipeline-parsing.ll50
1 files changed, 50 insertions, 0 deletions
diff --git a/test/Other/pass-pipeline-parsing.ll b/test/Other/pass-pipeline-parsing.ll
index c7fab01d2b..ba336108c9 100644
--- a/test/Other/pass-pipeline-parsing.ll
+++ b/test/Other/pass-pipeline-parsing.ll
@@ -55,6 +55,56 @@
; CHECK-MIXED-FP-AND-MP: Running module pass: NoOpModulePass
; CHECK-MIXED-FP-AND-MP: Finished module pass manager
+; RUN: not opt -disable-output -debug-pass-manager \
+; RUN: -passes='no-op-module)' %s 2>&1 \
+; RUN: | FileCheck %s --check-prefix=CHECK-UNBALANCED1
+; CHECK-UNBALANCED1: unable to parse pass pipeline description
+
+; RUN: not opt -disable-output -debug-pass-manager \
+; RUN: -passes='module(no-op-module))' %s 2>&1 \
+; RUN: | FileCheck %s --check-prefix=CHECK-UNBALANCED2
+; CHECK-UNBALANCED2: unable to parse pass pipeline description
+
+; RUN: not opt -disable-output -debug-pass-manager \
+; RUN: -passes='module(no-op-module' %s 2>&1 \
+; RUN: | FileCheck %s --check-prefix=CHECK-UNBALANCED3
+; CHECK-UNBALANCED3: unable to parse pass pipeline description
+
+; RUN: not opt -disable-output -debug-pass-manager \
+; RUN: -passes='no-op-function)' %s 2>&1 \
+; RUN: | FileCheck %s --check-prefix=CHECK-UNBALANCED4
+; CHECK-UNBALANCED4: unable to parse pass pipeline description
+
+; RUN: not opt -disable-output -debug-pass-manager \
+; RUN: -passes='function(no-op-function))' %s 2>&1 \
+; RUN: | FileCheck %s --check-prefix=CHECK-UNBALANCED5
+; CHECK-UNBALANCED5: unable to parse pass pipeline description
+
+; RUN: not opt -disable-output -debug-pass-manager \
+; RUN: -passes='function(function(no-op-function)))' %s 2>&1 \
+; RUN: | FileCheck %s --check-prefix=CHECK-UNBALANCED6
+; CHECK-UNBALANCED6: unable to parse pass pipeline description
+
+; RUN: not opt -disable-output -debug-pass-manager \
+; RUN: -passes='function(no-op-function' %s 2>&1 \
+; RUN: | FileCheck %s --check-prefix=CHECK-UNBALANCED7
+; CHECK-UNBALANCED7: unable to parse pass pipeline description
+
+; RUN: not opt -disable-output -debug-pass-manager \
+; RUN: -passes='function(function(no-op-function)' %s 2>&1 \
+; RUN: | FileCheck %s --check-prefix=CHECK-UNBALANCED8
+; CHECK-UNBALANCED8: unable to parse pass pipeline description
+
+; RUN: not opt -disable-output -debug-pass-manager \
+; RUN: -passes='no-op-module,)' %s 2>&1 \
+; RUN: | FileCheck %s --check-prefix=CHECK-UNBALANCED9
+; CHECK-UNBALANCED9: unable to parse pass pipeline description
+
+; RUN: not opt -disable-output -debug-pass-manager \
+; RUN: -passes='no-op-function,)' %s 2>&1 \
+; RUN: | FileCheck %s --check-prefix=CHECK-UNBALANCED10
+; CHECK-UNBALANCED10: unable to parse pass pipeline description
+
define void @f() {
ret void
}