[all-commits] [llvm/llvm-project] bc4d3c: [libcxx] Use integer division
Petr Hosek via All-commits
all-commits at lists.llvm.org
Mon Mar 29 12:00:11 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bc4d3ca7bd4401daafc22747ed952208cf18cba9
https://github.com/llvm/llvm-project/commit/bc4d3ca7bd4401daafc22747ed952208cf18cba9
Author: Petr Hosek <phosek at google.com>
Date: 2021-03-29 (Mon, 29 Mar 2021)
Changed paths:
M libcxx/utils/gdb/libcxx/printers.py
Log Message:
-----------
[libcxx] Use integer division
In Python 3, math.floor returns int when both arguments are ints.
In Python 2, math.floor returns float. This leads to a failure
because the result of math.floor is used as an array index. While
Python 2 is on its way out, it's still used in some places so use
an integer division instead.
Differential Revision: https://reviews.llvm.org/D99520
More information about the All-commits
mailing list