<div dir="ltr"><div>Dear LLVM devs,</div><div><br></div><div>I'm working on a project in which I need to associate some Values with LLVM Debug Info.<br></div><div>LLVM provides methods to easily iterate over both def-use and use-def chains</div><div>of a Value, but I'm having a problem when some of these Users is a debug intrisic.<br></div><div><br></div><div>I have the following situation <br></div><div><br></div><div>92 %call.i = tail call noalias dereferenceable_or_null(16) i8* @malloc(i64 16) #3, !dbg !90<br>93 %2 = bitcast i8* %call.i to %struct.Node*, !dbg !86<br>94 call void @llvm.dbg.value(metadata %struct.Node* %2, metadata !24, metadata !DIExpression()) #3, !dbg !89</div><div><br></div><div>If I iterate over the users of the value %2 (line 92), I cannot get the <br></div><div>debug instruction at line 94. Knowing that the value is used by metadata, <br></div><div>(method isUsedByMetadata returns true), is it possible to get the debug intrinsic</div><div>that uses value %2? Or this does not configure a Use of %2?<br></div><div><br></div><div>Any help would be appreciated.<br></div><div><br></div><div>Best regards,</div><div><br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">José Wesley de Souza Magalhães<div>MSc Student in Computer Science<br></div><div>Federal University of Minas Gerais - Brazil<br></div></div></div></div></div></div></div></div>