Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / MachO / Inputs / DependencyDump.py
blobbbd14d3ae701fa1eaf40589007cfebe48d5865a8
2 # Dump the dependency file (produced with -dependency_info) to text
3 # format for testing purposes.
6 import sys
8 f = open(sys.argv[1], "rb")
9 byte = f.read(1)
10 while byte != b"":
11 if byte == b"\x00":
12 sys.stdout.write("lld-version: ")
13 elif byte == b"\x10":
14 sys.stdout.write("input-file: ")
15 elif byte == b"\x11":
16 sys.stdout.write("not-found: ")
17 elif byte == b"\x40":
18 sys.stdout.write("output-file: ")
19 byte = f.read(1)
20 while byte != b"\x00":
21 sys.stdout.write(byte.decode("ascii"))
22 byte = f.read(1)
23 sys.stdout.write("\n")
24 byte = f.read(1)
26 f.close()