<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<pre style="white-space: pre-wrap; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">Thank you, Duncan. Then how about the composite types, especially struct and class types? I think they are more distinguishable from each other.
Pei Wang
> Hi Pei Wang,
> On 19/01/13 22:34, Pei Wang wrote:
>><i> Hi,
</i>>> <i>
</i>><i>> I am now trying to do some code analysis and need to get the debug information
</i>><i>> of the LLVM IR type encountered in the bitcode.
</i>
> I don't think this is going to work, because many different types in the
> original language map to the same LLVM IR type. For example the C types "int"
> and "unsigned" both become "i32" in LLVM. Yet "int" and "unsigned" have
> different debug info AFAIK, so which debug info should "i32" be mapped too?
> Ciao, Duncan.
>> <i>
</i>><i>> In detail, given a LLVM Type object, is it possible for me to retrieve the
</i>><i>> corresponding DIType (or MDNode) object? I feel LLVM should be able to know
</i>><i>> everything about a type, if the source file is compiled with the -g option by
</i>><i>> clang. I tried various methods but none of them allows me to connect a specific
</i>><i>> Type with its debug information.
</i>>> <i>
</i>><i>> Any one knows how to achieve this? Thank you in advance.
</i>>> <i>
</i>><i>> Pei Wang</i></pre>
</body>
</html>