llvm isTokenTy() deprecated?


I am trying to process the typeID from a type as follows:

Type *T;
   std::cout << "Token Type";

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:


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 :

Please let me know if this is a bug, or I am misunderstanding things.

Thank you, Best Regards,

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