[LLVMdev] How to get the debug information for an LLVM IR type?

Pei Wang uraj.wp at gmail.com
Sat Jan 19 13:34:31 PST 2013


Hi,

I am now trying to do some code analysis and need to get the debug 
information of the LLVM IR type encountered in the bitcode.

In detail, given a LLVM Type object, is it possible for me to retrieve 
the corresponding DIType (or MDNode) object? I feel LLVM should be able 
to know everything about a type, if the source file is compiled with the 
-g option by clang. I tried various methods but none of them allows me 
to connect a specific Type with its debug information.

Any one knows how to achieve this? Thank you in advance.

Pei Wang



More information about the llvm-dev mailing list