llvm isTokenTy() deprecated?

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

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