Skip to content

Commit c293107

Browse files
committed
Fix line endings produced by update_cc_test_checks.py
Use the same appraoch as update_llc_test_checks.py to always write \n line endings. This should fix the Windows buildbots.
1 parent f54e7b4 commit c293107

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/utils/update_cc_test_checks.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -292,10 +292,10 @@ def main():
292292
False, args.function_signature)
293293
output_lines.append(line.rstrip('\n'))
294294

295-
# Update the test file.
296-
with open(filename, 'w') as f:
297-
for line in output_lines:
298-
f.write(line + '\n')
295+
296+
common.debug('Writing %d lines to %s...' % (len(output_lines), filename))
297+
with open(filename, 'wb') as f:
298+
f.writelines(['{}\n'.format(l).encode('utf-8') for l in output_lines])
299299

300300
return 0
301301

0 commit comments

Comments
 (0)