[libcxx-commits] [PATCH] D99520: [libcxx] Use integer division
Petr Hosek via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Mar 29 11:24:25 PDT 2021
phosek updated this revision to Diff 333937.
phosek retitled this revision from "[libcxx] Convert the result of math.floor to int" to "[libcxx] Use integer division".
phosek edited the summary of this revision.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99520/new/
https://reviews.llvm.org/D99520
Files:
libcxx/utils/gdb/libcxx/printers.py
Index: libcxx/utils/gdb/libcxx/printers.py
===================================================================
--- libcxx/utils/gdb/libcxx/printers.py
+++ libcxx/utils/gdb/libcxx/printers.py
@@ -439,7 +439,7 @@
def _list_it(self):
for bit in range(self.bit_count):
- word = math.floor(bit / self.bits_per_word)
+ word = bit // self.bits_per_word
word_bit = bit % self.bits_per_word
if self.values[word] & (1 << word_bit):
yield ("[%d]" % bit, 1)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99520.333937.patch
Type: text/x-patch
Size: 527 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210329/7494fb74/attachment.bin>
More information about the libcxx-commits
mailing list