<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 6, 2015 at 4:21 PM, Zhoulai <span dir="ltr"><<a href="mailto:zell08v@gmail.com" target="_blank">zell08v@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">Thanks for asking. In my case, I need to avoid llvm:;instruction* as the identifier because the ID is to be passed to a callback function which only accepts primitive input values. Or, just imagine that you do not want the program segment that uses the identifier to be linked with LLVM. <br></div></blockquote><div><br>The somewhat more common way to do this would be with 'void*' but intptr_t's good too, depending on needs, etc.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"></div><div class="gmail_extra"><span class="HOEnZb"><font color="#888888"><br clear="all"><div><div>Zhoulai</div></div></font></span><span class="">
<br><div class="gmail_quote">On Wed, May 6, 2015 at 3:57 PM, Owen Anderson <span dir="ltr"><<a href="mailto:resistor@mac.com" target="_blank">resistor@mac.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What’s wrong with the pointer address?<br>
<br>
—Owen<br>
<div><div><br>
> On May 6, 2015, at 3:33 PM, Zhoulai <<a href="mailto:zell08v@gmail.com" target="_blank">zell08v@gmail.com</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> 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>
><br>
> Zhoulai<br>
</div></div>> _______________________________________________<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>
</blockquote></div><br></span></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">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></blockquote></div><br></div></div>