bolt/deps/llvm-18.1.8/llvm/test/tools/llvm-reduce/Inputs/remove-args.py

17 lines
376 B
Python
Raw Normal View History

2025-02-14 19:21:04 +01:00
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)