| OLD | NEW |
| 1 #!/usr/bin/env python2 | 1 #!/usr/bin/env python2 |
| 2 | 2 |
| 3 import argparse | 3 import argparse |
| 4 import itertools | 4 import itertools |
| 5 import re | 5 import re |
| 6 | 6 |
| 7 if __name__ == '__main__': | 7 if __name__ == '__main__': |
| 8 """Compares a LLVM file with a subzero file for differences. | 8 """Compares a LLVM file with a subzero file for differences. |
| 9 | 9 |
| 10 Before comparing, the LLVM file is massaged to remove comments, | 10 Before comparing, the LLVM file is massaged to remove comments, |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 lines_diff += 1 | 88 lines_diff += 1 |
| 89 continue | 89 continue |
| 90 if sz_line: print 'SZ (%d)> %s' % (lines_total, sz_line) | 90 if sz_line: print 'SZ (%d)> %s' % (lines_total, sz_line) |
| 91 if llc_line: print 'LL (%d)> %s' % (lines_total, llc_line) | 91 if llc_line: print 'LL (%d)> %s' % (lines_total, llc_line) |
| 92 return_code = 1 | 92 return_code = 1 |
| 93 | 93 |
| 94 if return_code == 0: | 94 if return_code == 0: |
| 95 message = 'Success (ignored %d diffs out of %d lines)' | 95 message = 'Success (ignored %d diffs out of %d lines)' |
| 96 print message % (lines_diff, lines_total) | 96 print message % (lines_diff, lines_total) |
| 97 exit(return_code) | 97 exit(return_code) |
| OLD | NEW |