From 6a2603c063387d0ee36977db7b0ca0aa4225e6f3 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Tue, 10 Sep 2019 23:10:10 +0000 Subject: llvm-reduce: Add pass to reduce parameters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch by Diego TreviƱo! Differential Revision: https://reviews.llvm.org/D65479 llvm-svn: 371567 --- llvm/test/Reduce/Inputs/remove-args.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 llvm/test/Reduce/Inputs/remove-args.py (limited to 'llvm/test/Reduce/Inputs/remove-args.py') diff --git a/llvm/test/Reduce/Inputs/remove-args.py b/llvm/test/Reduce/Inputs/remove-args.py new file mode 100755 index 00000000000..fea62c3174e --- /dev/null +++ b/llvm/test/Reduce/Inputs/remove-args.py @@ -0,0 +1,16 @@ +import sys + +InterestingArgumentPresent = False +FunctionCallPresent = False + +input = open(sys.argv[1], "r") +for line in input: + if "%interesting" in line: + InterestingArgumentPresent = True + if "call void @interesting" in line: + FunctionCallPresent = True + +if InterestingArgumentPresent and FunctionCallPresent: + sys.exit(0) # Interesting! + +sys.exit(1) -- cgit v1.2.3