where is type symbol table now

Hello,

I found some source code using llvm 2.5 that has a call to Module::getTypeName(Type*), which I can’t find it anymore in llvm newer than 3.3, so how can I get the name of a type(e.g a user-defined structure) if we have Type* of that ?

Besides, I checked that old llvm maintains a TypeSymbolTable that enabled type name look-up, so what’s the replacement and mechanism of it in the newer llvm now ?

thanks

Does anyone has any idea of that ?

thanks

T->getStructName() if T is type Type*, but it must be a StructType*

http://llvm.org/docs/doxygen/html/Type_8cpp_source.html#l00192

or T->getName() if T is type StructType*

http://llvm.org/docs/doxygen/html/classllvm_1_1StructType.html#abefbddaaaecf8d0a4eea18339fedfe94
http://llvm.org/docs/doxygen/html/Type_8cpp_source.html#l00581

You can peek into the implementation details in the definition of setName() and see a map:

http://llvm.org/docs/doxygen/html/Type_8cpp_source.html#l00437