@@ -311,7 +311,7 @@ def _annotate_nobody_function(k_cell: KInner, smir_info: SMIRInfo) -> list[str]:
311311 KApply (
312312 label = KLabel (name = 'MonoItemKind::MonoItemFn' ),
313313 args = [
314- KApply (args = [KToken (token = symbol_name )]),
314+ KApply (args = [KToken ()]),
315315 KApply (label = KLabel (name = 'defId(_)_BODY_DefId_Int' ), args = [KToken (token = def_id_str )]),
316316 KApply (label = KLabel (name = 'noBody_BODY_MaybeBody' ), args = []),
317317 ],
@@ -324,7 +324,7 @@ def _annotate_nobody_function(k_cell: KInner, smir_info: SMIRInfo) -> list[str]:
324324 KApply (
325325 label = KLabel (name = 'MonoItemKind::MonoItemFn' ),
326326 args = [
327- KApply (args = [KToken (token = symbol_name )]),
327+ KApply (args = [KToken ()]),
328328 KApply (label = KLabel (name = 'defId(_)_BODY_DefId_Int' ), args = [KToken (token = def_id_str )]),
329329 KApply (label = KLabel (name = 'noBody_BODY_MaybeBody' ), args = []),
330330 ],
@@ -339,19 +339,14 @@ def _annotate_nobody_function(k_cell: KInner, smir_info: SMIRInfo) -> list[str]:
339339
340340 def_id = int (def_id_str )
341341
342- # Prefer concrete symbol from the term; for unresolved placeholders, fall back to DefId lookup.
343- if symbol_name == '\" ** UNKNOWN FUNCTION **\" ' :
344- func_sym = smir_info .function_symbols .get (def_id , {})
345- display_name = func_sym .get ('NormalSym' ) or func_sym .get ('IntrinsicSym' )
346- else :
347- display_name = symbol_name .strip ('\" ' )
348-
349- if display_name :
342+ # Use extracted DefId for function name
343+ func_sym = smir_info .function_symbols .get (def_id , {})
344+ if name := func_sym .get ('NormalSym' ) or func_sym .get ('IntrinsicSym' ):
350345 try :
351- display_name = _demangle (display_name )
346+ name = _demangle (name )
352347 except Exception :
353348 pass
354- annotations .append (f' >> function: { display_name } ' )
349+ annotations .append (f' >> function: { name } ' )
355350
356351 # Use extracted Span for call site
357352 if span is not None and span in smir_info .spans :
0 commit comments