<div dir="ltr"><span class=""></span><div class="gmail_extra"><div class="gmail_quote"><div>thanks for your time and reply.<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000"><span class="">
<br></span>
Look at the Doxygen documentation on the LLVM web site for
documentation on the Value and Instruction classes. They probably
have methods for retrieving the Debug Metadata (and if they don't,
one of their subclasses/superclasses does). You can search through
the LLVM source code for examples as well, plus I think there's a
document that describes the format of the LLVM Debug Metadata on the
LLVM web page.<span class=""><br>
<br></span></div></blockquote><div><br></div><div>what about DILocalVariable class? do you think it would provide any info about the case? <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000"><span class="">
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div> </div>
<blockquote class="gmail_quote">
<div> <br>
It sounds like you need to be analyzing Clang ASTs
instead of LLVM IR. The Clang AST represents a program
in its original source form, so you can tell what is a
program variable, in what file it was defined, its
original source type, etc.<br>
</div>
</blockquote>
<div><br>
</div>
<div>I'm not sure about Clang ASTs but this is part of an
llvm pass which analyzes llvm IR. So, i doubt if i can use
Clang AST.<br>
</div>
</div>
</div>
</div>
</blockquote>
<br></span>
Why are you restricted to using LLVM IR?<br></div></blockquote><div><br></div><div>I'm working on some part of a project. The whole project works on llvm ir. <br><br></div><div>Best,<br></div><div bgcolor="#FFFFFF" text="#000000">Mohammad<span class=""><br>
</span></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div><br></div></div>