[llvm-dev] How to know the sub-class of a Value class?

Dipanjan Das via llvm-dev llvm-dev at lists.llvm.org
Sun Jun 11 23:31:12 PDT 2017


On 11 June 2017 at 23:25, Jeremy Lakeman <Jeremy.Lakeman at gmail.com> wrote:

> I'm certainly no expert, but how you use that Value* would depend on what
> you want to do with it.
>
> From the documentation, it looks like Value->getValueID() is how the RTTI
> implementation determines the subclass.
> So you could switch over the values returned (defined in
> llvm/IR/Value.def).
>

In my <llvm-root>/include/llvm/IR/Value.def, there's no mapping between the
numeric ID (as returned by getValueID()) and corresponding sub-class.


Thanks & Regards,
Dipanjan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170611/bc3f2a07/attachment.html>


More information about the llvm-dev mailing list