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
On Wed, Apr 15, 2015 at 5:59 PM, Hui Zhang <wayne.huizhang at gmail.com>
wrote:
> Does anyone has any idea of that ?
>
> thanks
>
> On Wed, Apr 15, 2015 at 3:50 PM, Hui Zhang <wayne.huizhang at
gmail.com>
> wrote:
>
>> 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
>>
>> --
>> Best regards
>>
>>
>> Hui Zhang
>>
>
>
>
> --
> Best regards
>
>
> Hui Zhang
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20150415/be05fd36/attachment.html>