[lld] 015c431 - [lld] Pass random.randint stop parameter as int.
Jez Ng via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 10 18:58:04 PST 2023
Author: Jacek Caban
Date: 2023-03-10T21:57:12-05:00
New Revision: 015c43178f9d8531b6bcd1685dbf72b7d837cf5a
URL: https://github.com/llvm/llvm-project/commit/015c43178f9d8531b6bcd1685dbf72b7d837cf5a
DIFF: https://github.com/llvm/llvm-project/commit/015c43178f9d8531b6bcd1685dbf72b7d837cf5a.diff
LOG: [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
Added:
Modified:
lld/test/MachO/tools/generate-cfi-funcs.py
Removed:
################################################################################
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
More information about the llvm-commits
mailing list