[PATCH] D73011: [opt viewer] Python compat - decode/encode string

Yuanfang Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 19 18:00:27 PST 2020


ychen created this revision.
ychen added reviewers: anemet, serge-sans-paille.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Use io.open instead of codecs.open according to here
https://stackoverflow.com/questions/10971033/backporting-python-3-openencoding-utf-8-to-python-2

Add `u` prefix to string literal to make them utf-8 in python2.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D73011

Files:
  llvm/tools/opt-viewer/opt-viewer.py
  llvm/tools/opt-viewer/optrecord.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73011.239016.patch
Type: text/x-patch
Size: 3305 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200120/f8816261/attachment.bin>


More information about the llvm-commits mailing list