[lit] Prefer opening files with open (Python 2) rather than io.open which requires io.
authorAaron Smith <aaron.smith@microsoft.com>
Tue, 3 Apr 2018 00:22:12 +0000 (00:22 +0000)
committerAaron Smith <aaron.smith@microsoft.com>
Tue, 3 Apr 2018 00:22:12 +0000 (00:22 +0000)
commit061354b586bb03b9869565334be88d7997b36d95
tree9696bc1cf6004fdf1850163a6844e7ee10d5edbe
parent7855e77b91776b784a6019a12dfda23d3b4af40c
[lit] Prefer opening files with open (Python 2) rather than io.open which requires io.

Only rely on Python 3 (io.open) when necessary. This puts TestRunnyer.py closer to how it behaved
before the changes introduced in D43165 and silences a few Windows build bot failures.

Thanks to Stella Stamenova for the patch!

llvm-svn: 329037
llvm/utils/lit/lit/TestRunner.py