summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
diff options
context:
space:
mode:
authorMichal Gorny <mgorny@gentoo.org>2019-06-24 09:40:33 +0000
committerMichal Gorny <mgorny@gentoo.org>2019-06-24 09:40:33 +0000
commita5bb7b6c20e2812da265a31624fc49f41dc6ff04 (patch)
tree65be2c5aed487421346a9cd07f511ce61bc7bd25 /llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
parentbb6d0b8e7b0d815710a71b8012438a586e986450 (diff)
downloadbcm5719-llvm-a5bb7b6c20e2812da265a31624fc49f41dc6ff04.tar.gz
bcm5719-llvm-a5bb7b6c20e2812da265a31624fc49f41dc6ff04.zip
[libcxx] [test] Read files as bytestrings to fix py3 encoding issues
Use binary mode to read test files in libcxx LibcxxTestFormat class. This ensures that tests are read correctly independently of encoding, and therefore fixes UnicodeDecodeError when file is opened in Python 3 that defaults to pure ASCII encoding. Technically this could be also fixed via conditionally appending encoding argument when opening the file in Python 3. However, since the code in question only searches for fixed ASCII substrings reading it in binary mode is simpler and more universal. Differential Revision: https://reviews.llvm.org/D63346 llvm-svn: 364170
Diffstat (limited to 'llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud