[LLVMdev] Associating types directly with debug metadata?

Pekka Nikander pekka.nikander at nomadiclab.com
Tue Oct 5 00:59:09 PDT 2010


>>> I thought about that more, and I think the "right" way would be to have a syntax like
>>> 
>>> !21 = metadata !{ typeval %struct.T, metadata !11 }
>>> 
>>> to avoid the problem with the keyword 'type'.
>>> 
> 
> Anyway, I already implemented an early patch for making Types representable as Values.  For that I created a new class, TypeValue, which represents a type as a value.  An early patch for that enclosed.  Works when reading or writing textual representations; no BC representation yet.  And no test case yet.  

Here is another version of the patch.  This one includes also a small patch to llvm-gcc so that it generates the type metadata for structures and classes.  This one also generates and parses correctly the metadata for .ll files.  No .bc support yet.  The biggest problem with this version is that it breaks when the compiler/linker performs type reductions, and I don't understand why.

--Pekka

-------------- next part --------------
A non-text attachment was scrubbed...
Name: TypeValue.diff
Type: application/octet-stream
Size: 16812 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101005/93446e93/attachment.obj>


More information about the llvm-dev mailing list