<div dir="ltr">Thanks. I did not know this simple mechanism, shame... <br><br>Is it safe? Can I then pass the intptr_t to int or long int? In my case, the ID has to be passed to a call back function accepting only primitive typed parameters. <br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature">Zhoulai</div></div>
<br><div class="gmail_quote">On Wed, May 6, 2015 at 4:12 PM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">intptr_t id = static_cast<intptr_t>(inst); <br><br>?</div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, May 6, 2015 at 3:33 PM, Zhoulai <span dir="ltr"><<a href="mailto:zell08v@gmail.com" target="_blank">zell08v@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>Hi, </div><div><br></div><div>I wonder whether we can easily retrieve an LLVM instruction ID that uniquely identifies the instruction. In my case, I need to avoid using llvm::Instruction* directly. Given an 'inst' of type llvm::instruction*, is there some readily usable method as simple as “int id = inst->id( )”? Thanks. <br></div><span><font color="#888888"><div><br></div><div><div>Zhoulai</div></div>
</font></span></div>
<br></div></div><span class="">_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></span></blockquote></div><br></div>
</blockquote></div><br></div>