[llvm-commits] [PATCH] Support for printing of graphs with stack-based nodes

Ivan Llopard ivanllopard at gmail.com
Thu Jul 5 07:45:07 PDT 2012


Hi,

I've been using GraphWriter and DOTGraphTraits to print a custom tree 
structure where nodes are stacked-based objects. Looking at the 
streaming of dot files, the pointer value of nodes is used to uniquely 
identify them.

ID=static_cast<const void*>(Node)

But this won't work for stack-based nodes. The attached patch add 
printing support of unique node identifiers in order to cover both use 
cases.
I would have preferred unsigned for the ID's type but unsigned<->const 
void* casts are not allowed. Please, could you review it ?

Ivan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: graphwriter.patch
Type: text/x-patch
Size: 2484 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120705/5de58141/attachment.bin>


More information about the llvm-commits mailing list