diff options
| author | Brian Gesiak <modocache@gmail.com> | 2017-08-11 18:05:26 +0000 |
|---|---|---|
| committer | Brian Gesiak <modocache@gmail.com> | 2017-08-11 18:05:26 +0000 |
| commit | fd6c89dc36afd359365c2ef5119ebcb2bbe6bdb7 (patch) | |
| tree | 3e7b058b7ffb7a417f357ff321bfcc9dc1bfd7ad /llvm/lib/CodeGen/VirtRegMap.cpp | |
| parent | 34f07f9e0e544a8369e9b548af909eda9461b055 (diff) | |
| download | bcm5719-llvm-fd6c89dc36afd359365c2ef5119ebcb2bbe6bdb7.tar.gz bcm5719-llvm-fd6c89dc36afd359365c2ef5119ebcb2bbe6bdb7.zip | |
[opt-viewer] Decode HTML bytes for Python 3
Summary:
When using Python 3, `pygments.highlight()` returns a `bytes` object, not
a `str`, causing the call to `str.replace` on the following line to fail
with a runtime exception:
`TypeError: 'str' does not support the buffer interface`. Decode the
bytes into a string in order to fix the exception.
Test Plan:
Run `opt-viewer.py` with Python 3.4, and confirm no runtime error occurs
when calling `str.replace`.
Reviewers: anemet
Reviewed By: anemet
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D36624
llvm-svn: 310741
Diffstat (limited to 'llvm/lib/CodeGen/VirtRegMap.cpp')
0 files changed, 0 insertions, 0 deletions

