Skip to content

Commit 015c431

Browse files
cjacekint3
authored andcommitted
[lld] Pass random.randint stop parameter as int.
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." Reviewed By: #lld-macho, int3 Differential Revision: https://reviews.llvm.org/D145826
1 parent 507c67d commit 015c431

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lld/test/MachO/tools/generate-cfi-funcs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def print_function(name):
2323
global lsda_odds
2424
have_lsda = (random.random() < lsda_odds)
2525
frame_size = random.randint(4, 64) * 16
26-
frame_offset = -random.randint(0, (frame_size/16 - 4)) * 16
26+
frame_offset = -random.randint(0, int(frame_size/16 - 4)) * 16
2727
global func_size_low, func_size_high
2828
func_size = random.randint(func_size_low, func_size_high) * 0x10
2929
func_size_high += 1

0 commit comments

Comments
 (0)