[PATCH] D58820: Fix update_mir_test_checks.py to run on python3

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 1 23:43:37 PST 2019


MaskRay added inline comments.


================
Comment at: utils/update_mir_test_checks.py:413
     with open(test, 'wb') as fd:
-        fd.writelines([l + '\n' for l in output_lines])
+        fd.writelines(['{}\n'.format(l).encode('utf-8') for l in output_lines])
 
----------------
`encode()` should also work if we don't expect Unicode in `l`. But it just saves a few characters so may not be worthy


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58820/new/

https://reviews.llvm.org/D58820





More information about the llvm-commits mailing list