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

NAKAMURA Takumi via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 30 16:14:39 PST 2017


ping

On Mon, Dec 5, 2016 at 8:31 PM NAKAMURA Takumi via Phabricator <
reviews at reviews.llvm.org> wrote:

> 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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170131/9280ed35/attachment.html>


More information about the llvm-commits mailing list