[PATCH] D27972: Improve natvis for llvm::SmallString so that it correctly displays only the valid portion of the string
Antonio Maiorano via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 19 22:05:25 PST 2016
amaiorano updated this revision to Diff 82065.
amaiorano added a comment.
Added "na" format specifier to not show the pointer address to the string, so it looks exactly as it did before. Updated screenshot of what it looks like forthcoming...
https://reviews.llvm.org/D27972
Files:
utils/LLVMVisualizers/llvm.natvis
Index: utils/LLVMVisualizers/llvm.natvis
===================================================================
--- utils/LLVMVisualizers/llvm.natvis
+++ utils/LLVMVisualizers/llvm.natvis
@@ -56,8 +56,8 @@
</Expand>
</Type>
<Type Name="llvm::SmallString<*>">
- <DisplayString>{BeginX,s}</DisplayString>
- <StringView>BeginX,s</StringView>
+ <DisplayString>{(const char*)BeginX,[(char*)EndX - (char*)BeginX] na}</DisplayString>
+ <StringView>(const char*)BeginX,[(char*)EndX - (char*)BeginX]</StringView>
<Expand>
<Item Name="[size]">(char*)EndX - (char*)BeginX</Item>
<Item Name="[capacity]">(char*)CapacityX - (char*)BeginX</Item>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27972.82065.patch
Type: text/x-patch
Size: 687 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161220/89066328/attachment.bin>
More information about the llvm-commits
mailing list