[LLVMdev] typedef struct

Duncan Sands baldrick at free.fr
Sun Oct 4 09:50:25 PDT 2009


Hi Alvin,

> Actually what I am doing is matching up each Type with its corresponding 
> debug info.  I have checked that the debug info generated is consistent 
> (i.e., typeA is recorded as a derived type from composite type typeB in 
> my example), but I have seen cases where the name recorded in the Type 
> object is typeA and sometimes typeB, that's why I am confused.

do you get this naming strangeness in the debug info, or in other parts
of the LLVM IR?  LLVM uses structural equivalence, so for example two
struct types with the same fields are considered to be the same.  This
can result in the "wrong" name being used for the type in the IR.  So if
that's the phenomenon you are seeing then there is nothing wrong because
this is not visible to users.  However if the wrong name is being output
in debug info (so in gdb you would see the wrong name) then that sounds
like a bug.  So can you please be more clear about exactly when you see
this strangeness.

Ciao,

Duncan.



More information about the llvm-dev mailing list