From 015c43178f9d8531b6bcd1685dbf72b7d837cf5a Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Fri, 10 Mar 2023 21:54:14 -0500 Subject: [PATCH] [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 --- lld/test/MachO/tools/generate-cfi-funcs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lld/test/MachO/tools/generate-cfi-funcs.py b/lld/test/MachO/tools/generate-cfi-funcs.py index 3f22008349f4..e2b75d0cd9a5 100755 --- a/lld/test/MachO/tools/generate-cfi-funcs.py +++ b/lld/test/MachO/tools/generate-cfi-funcs.py @@ -23,7 +23,7 @@ def print_function(name): 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 -- 2.41.0