<div dir="ltr">Looks like we crossed paths.  I just submitted an update to this at this very moment, although I changed the title of the review.  Either way, visualizers aren't too critical so if I'll just push it in sometime later today.  If you have any feedback though let me know as I'm still learning this natvis stuff.<div>
<br></div><div>BTW, do you think there would be any interest in having a DLL where we could write arbitrary code to generate the visualization tree?  It seems like natvis is frustratingly limited in what you can specify.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 26, 2014 at 2:01 PM, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron.ballman@gmail.com" target="_blank">aaron.ballman@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Thu, Jun 26, 2014 at 2:42 PM, Zachary Turner <<a href="mailto:zturner@google.com">zturner@google.com</a>> wrote:<br>

> Hi aaron.ballman,<br>
><br>
> Figures out the derived type of an llvm::Type, and adds an entry to the watch window that automatically casts to the derived type.<br>
><br>
> I'm not very good at writing these, so I'm not sure if this is the best possible way to express this.<br>
<br>
</div>This looks reasonable to me. There may be a better way to do it, but<br>
if there is, I certainly am unaware of it. :-)<br>
<br>
Thanks!<br>
<span class="HOEnZb"><font color="#888888"><br>
~Aaron<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
><br>
> <a href="http://reviews.llvm.org/D4316" target="_blank">http://reviews.llvm.org/D4316</a><br>
><br>
> Files:<br>
>   utils/llvm.natvis<br>
><br>
> Index: utils/llvm.natvis<br>
> ===================================================================<br>
> --- utils/llvm.natvis<br>
> +++ utils/llvm.natvis<br>
> @@ -166,4 +166,36 @@<br>
>        <Item Name="[underlying]" Condition="hasVal">*(($T1 *)(unsigned char *)storage.buffer)</Item><br>
>      </Expand><br>
>    </Type><br>
> +<br>
> +  <Type Name="llvm::Value"><br>
> +    <DisplayString Condition="Name != 0">{Name}</DisplayString><br>
> +    <Expand><br>
> +      <Item Name="VTy">VTy</Item><br>
> +      <Item Name="UseList">UseList</Item><br>
> +      <Item Name="Name">Name</Item><br>
> +      <Item Name="SubclassID">(llvm::Value::ValueTy)SubclassID</Item><br>
> +      <Item Name="HasValueHandle">(bool)HasValueHandle</Item><br>
> +      <Item Name="SubclassOptionalData">SubclassOptionalData</Item><br>
> +      <Item Name="SubclassData">SubclassData</Item><br>
> +    </Expand><br>
> +  </Type><br>
> +<br>
> +  <Type Name="llvm::Type"><br>
> +    <DisplayString>{(llvm::Type::TypeID)(IDAndSubclassData &amp; 255)}</DisplayString><br>
> +    <Expand><br>
> +      <Item Name="[Integer Type]" Condition="(IDAndSubclassData &amp; 255) == llvm::Type::IntegerTyID">*(llvm::IntegerType*)this</Item><br>
> +      <Item Name="[Function Type]" Condition="(IDAndSubclassData &amp; 255) == llvm::Type::FunctionTyID">*(llvm::FunctionType*)this</Item><br>
> +      <Item Name="[Struct Type]" Condition="(IDAndSubclassData &amp; 255) == llvm::Type::StructTyID">*(llvm::StructType*)this</Item><br>
> +      <Item Name="[Array Type]" Condition="(IDAndSubclassData &amp; 255) == llvm::Type::ArrayTyID">*(llvm::ArrayType*)this</Item><br>
> +      <Item Name="[Pointer Type]" Condition="(IDAndSubclassData &amp; 255) == llvm::Type::PointerTyID">*(llvm::PointerType*)this</Item><br>
> +      <Item Name="[Vector Type]" Condition="(IDAndSubclassData &amp; 255) == llvm::Type::VectorTyID">*(llvm::VectorType*)this</Item><br>
> +    </Expand><br>
> +  </Type><br>
> +<br>
> +  <Type Name="llvm::SequentialType"><br>
> +    <Expand><br>
> +      <Item Name="ContainedType">ContainedType</Item><br>
> +      <ExpandedItem>*(llvm::Type*)this,nd</ExpandedItem><br>
> +    </Expand><br>
> +  </Type><br>
>  </AutoVisualizer><br>
</div></div></blockquote></div><br></div>