summaryrefslogtreecommitdiffstats
path: root/llvm/test/Reduce/Inputs/remove-args.py
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2019-09-10 23:10:10 +0000
committerDavid Blaikie <dblaikie@gmail.com>2019-09-10 23:10:10 +0000
commit6a2603c063387d0ee36977db7b0ca0aa4225e6f3 (patch)
tree9aa9a663c92613cf4ee49ed34765bf5f360c08f9 /llvm/test/Reduce/Inputs/remove-args.py
parent244e738485445fa4b72bfef9b9b2f9625cee989e (diff)
downloadbcm5719-llvm-6a2603c063387d0ee36977db7b0ca0aa4225e6f3.tar.gz
bcm5719-llvm-6a2603c063387d0ee36977db7b0ca0aa4225e6f3.zip
llvm-reduce: Add pass to reduce parameters
Patch by Diego TreviƱo! Differential Revision: https://reviews.llvm.org/D65479 llvm-svn: 371567
Diffstat (limited to 'llvm/test/Reduce/Inputs/remove-args.py')
-rwxr-xr-xllvm/test/Reduce/Inputs/remove-args.py16
1 files changed, 16 insertions, 0 deletions
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)
OpenPOWER on IntegriCloud