[llvm-dev] llvm isTokenTy() deprecated?

Reid Kleckner via llvm-dev llvm-dev at lists.llvm.org
Tue Mar 29 09:47:44 PDT 2016


No, it's not deprecated. Token types were recently added in August. It
seems more likely that you are compiling with old LLVM headers.

On Tue, Mar 29, 2016 at 8:50 AM, Shehbaz Jaffer via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hi,
>
> I am trying to process the typeID from a type as follows:
>
> Type *T;
> if(T->isTokenTy()){
>    std::cout << "Token Type";
> }
>
> /home/shehbaz/courses/ece1781/project/fslice/plugin/FSlice.cpp:147:14:
> error: ‘class llvm::Type’ has no member named ‘isTokenTy’
>    else if(T->isTokenTy())
>               ^
>
> I am successfully able to do this for all other 20-25 types mentioned here:
>
>
> http://llvm.org/docs/doxygen/html/classllvm_1_1Type.html#a5e9e1c0dd93557be1b4ad72860f3cbda
>
> Also, I noticed that for type int32, When I do getTypeID(), I get
> return value 10. However, when I check the enum of Type IDs, I see
> that 10 corresponds to tokens and not integers. enum value 11
> corresponds to integers :
>
> http://llvm.org/docs/doxygen/html/classllvm_1_1Type.html#a5e9e1c0dd93557be1b4ad72860f3cbda
>
> Please let me know if this is a bug, or I am misunderstanding things.
>
> Thank you, Best Regards,
> Shehbaz
>
> --
> Shehbaz Jaffer
> First Year Graduate Student
> Sir Edward S Rogers Sr Department of Electrical and Computer Engineering
> University of Toronto
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160329/91064364/attachment.html>


More information about the llvm-dev mailing list