[LLVMdev] Integer ID for LLVM::Instruction*?
David Blaikie
dblaikie at gmail.com
Wed May 6 16:51:16 PDT 2015
On Wed, May 6, 2015 at 4:21 PM, Zhoulai <zell08v at gmail.com> wrote:
> 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.
>
The somewhat more common way to do this would be with 'void*' but
intptr_t's good too, depending on needs, etc.
>
> Zhoulai
>
> On Wed, May 6, 2015 at 3:57 PM, Owen Anderson <resistor at mac.com> wrote:
>
>> What’s wrong with the pointer address?
>>
>> —Owen
>>
>> > On May 6, 2015, at 3:33 PM, Zhoulai <zell08v at gmail.com> wrote:
>> >
>> > Hi,
>> >
>> > 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.
>> >
>> > Zhoulai
>> > _______________________________________________
>> > LLVM Developers mailing list
>> > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
>> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150506/6ac6f3c8/attachment.html>
More information about the llvm-dev
mailing list