Skip to content

Commit 78332c7

Browse files
committed
clean up _addrspace to bypass the type caching
1 parent 4b29d34 commit 78332c7

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

numba_cuda/numba/cuda/debuginfo.py

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -796,16 +796,25 @@ def mark_variable(
796796
# to llvm.dbg.value
797797
return
798798
else:
799-
return super().mark_variable(
800-
builder,
801-
allocavalue,
802-
name,
803-
lltype,
804-
size,
805-
line,
806-
datamodel,
807-
argidx,
808-
)
799+
try:
800+
return super().mark_variable(
801+
builder,
802+
allocavalue,
803+
name,
804+
lltype,
805+
size,
806+
line,
807+
datamodel,
808+
argidx,
809+
)
810+
finally:
811+
# Clean up _addrspace to bypass the type caching
812+
if (
813+
datamodel is not None
814+
and hasattr(datamodel, "fe_type")
815+
and hasattr(datamodel.fe_type, "_addrspace")
816+
):
817+
delattr(datamodel.fe_type, "_addrspace")
809818

810819
def update_variable(
811820
self,

0 commit comments

Comments
 (0)