From 851236ef7a703e062d18d67bbc74cae3a00a0138 Mon Sep 17 00:00:00 2001 From: jiel-nv Date: Mon, 3 Mar 2025 14:05:23 -0800 Subject: [PATCH] Update metadata cache to use stringified key. --- llvmlite/ir/module.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvmlite/ir/module.py b/llvmlite/ir/module.py index bfac185c6..1638c0c48 100644 --- a/llvmlite/ir/module.py +++ b/llvmlite/ir/module.py @@ -82,7 +82,8 @@ def add_debug_info(self, kind, operands, is_distinct=False): an instruction. """ operands = tuple(sorted(self._fix_di_operands(operands.items()))) - key = (kind, operands, is_distinct) + str_op_key = tuple(sorted(self.str_ditok_operands(operands.items()))) + key = (kind, str_op_key, is_distinct) if key not in self._metadatacache: n = len(self.metadata) di = values.DIValue(self, is_distinct, kind, operands, name=str(n))