[PATCH] D145826: [lld] Pass random.randint stop parameter as int.
Jacek Caban via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 10 13:24:49 PST 2023
jacek created this revision.
jacek added reviewers: lld-macho, thakis.
Herald added projects: lld-macho, All.
jacek requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
It's required by Python 3.12, from https://docs.python.org/3.12/library/random.html "Changed in version 3.12: Automatic conversion of non-integer types is no longer supported."
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D145826
Files:
lld/test/MachO/tools/generate-cfi-funcs.py
Index: lld/test/MachO/tools/generate-cfi-funcs.py
===================================================================
--- lld/test/MachO/tools/generate-cfi-funcs.py
+++ lld/test/MachO/tools/generate-cfi-funcs.py
@@ -23,7 +23,7 @@
global lsda_odds
have_lsda = (random.random() < lsda_odds)
frame_size = random.randint(4, 64) * 16
- frame_offset = -random.randint(0, (frame_size/16 - 4)) * 16
+ frame_offset = -random.randint(0, int(frame_size/16 - 4)) * 16
global func_size_low, func_size_high
func_size = random.randint(func_size_low, func_size_high) * 0x10
func_size_high += 1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145826.504269.patch
Type: text/x-patch
Size: 598 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230310/aee56ba6/attachment.bin>
More information about the llvm-commits
mailing list