summaryrefslogtreecommitdiff
path: root/test/Other
diff options
context:
space:
mode:
authorWeiming Zhao <weimingz@codeaurora.org>2016-01-06 18:20:25 +0000
committerWeiming Zhao <weimingz@codeaurora.org>2016-01-06 18:20:25 +0000
commit79d91e563fd0543bb7da494ebf3709c0e325099f (patch)
tree0b740d13529e70ffb622b1303f0a3832dd8b9983 /test/Other
parentc1bdb0b0ce76ca2d68f8c71e68cc76842bfe7c17 (diff)
Filtering IR printing for print-after-all/print-before-all
Summary: This patch implements "-print-funcs" option to support function filtering for IR printing like -print-after-all, -print-before etc. Examples: -print-after-all -print-funcs=foo,bar Reviewers: mcrosier, joker.eph Subscribers: tejohnson, joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D15776 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256952 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Other')
-rw-r--r--test/Other/2010-05-06-Printer.ll14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/Other/2010-05-06-Printer.ll b/test/Other/2010-05-06-Printer.ll
index e57b9825b33..dcc0e752bb5 100644
--- a/test/Other/2010-05-06-Printer.ll
+++ b/test/Other/2010-05-06-Printer.ll
@@ -1,7 +1,19 @@
; RUN: llc -O2 -print-after-all < %s 2>/dev/null
+; RUN: llc -O2 -print-after-all < %s 2>&1 | FileCheck %s --check-prefix=ALL
+; RUN: llc -O2 -print-after-all -filter-print-funcs=foo < %s 2>&1 | FileCheck %s --check-prefix=FOO
; REQUIRES: default_triple
-
define void @tester(){
ret void
}
+define void @foo(){
+ ret void
+}
+
+;ALL: define void @tester()
+;ALL: define void @foo()
+;ALL: ModuleID =
+
+;FOO: IR Dump After
+;FOO-NEXT: define void @foo()
+;FOO-NOT: define void @tester