summaryrefslogtreecommitdiff
path: root/llvm/test/tools/llvm-reduce/Inputs/remove-args.py
blob: e003c6a6acecdecdc0c0754f58bd31c71da4cc49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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)