[PATCH] D27405: Make sancov.py py3-compatible

NAKAMURA Takumi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 5 03:31:33 PST 2016


chapuni created this revision.
chapuni added a reviewer: kcc.
chapuni added a subscriber: llvm-commits.
chapuni set the repository for this revision to rL LLVM.
Herald added a subscriber: kubabrecka.

This patch is squashed from a few commits.

  sancov.py: [Py3] Get rid of "print" statement. Use print() or write() instead.



  sancov.py: [Py3] Use '//' instead of '/' as division operator.
  
  Py3 emits float with '/'.

Py3 has '//' as integer division operator.

  sancov.py: [Py3] Use sys.stdout.buffer for bytes.

Py2 doesn't have sys.stdout.buffer. An idea from http://stackoverflow.com/questions/23932332

  sancov.py: [Py3] Use bytes.decode() explicitly.
  
  Or bogus filename like "b'foo'" would be generated.


Repository:
  rL LLVM

https://reviews.llvm.org/D27405

Files:
  compiler-rt/trunk/lib/sanitizer_common/scripts/sancov.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27405.80243.patch
Type: text/x-patch
Size: 7052 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161205/68723f67/attachment.bin>


More information about the llvm-commits mailing list