[PATCH] D135685: [Visualizers] Add natvis visualizers for various internal llvm classes

Trass3r via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 7 07:14:22 PST 2022


Trass3r added inline comments.


================
Comment at: llvm/utils/LLVMVisualizers/llvm.natvis:304
+  <Type Name="llvm::SDNode">
+    <DisplayString>$(Type) {getOperationName(nullptr)}</DisplayString>
+    <Expand>
----------------
RKSimon wrote:
> Does this work? It always seems to display "{llvm::SDNode ???}" for me
> 
The method still exists, maybe something goes wrong when it tries to call it?


================
Comment at: llvm/utils/LLVMVisualizers/llvm.natvis:41
+    <DisplayString Condition="Length < 4">{Data,[Length]}</DisplayString>
+    <DisplayString Condition="Length > 3">{Length} elements</DisplayString>
     <Expand>
----------------
RKSimon wrote:
> RKSimon wrote:
> > Trass3r wrote:
> > > RKSimon wrote:
> > > > Any chance that we can have ArrayRef and SmallVectorImpl show a more similar representation?
> > > You mean simplifying SmallVector?
> > > Or changing this one?
> > Whichever is easier would be fine
> I'm seeing a NatVis verbose warning from this:
> ```
> Natvis: E:\llvm\llvm-project\llvm\utils\LLVMVisualizers\llvm.natvis(30,4): Warning: Unable to load a visualized preview for type 'llvm::ArrayRef<int>' because the conditions of all <DisplayString> elements were false.
> ```
Hmm the conditions do cover all values.
Do we perhaps need a `<DisplayString>Uninitialized</DisplayString>` like above?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135685/new/

https://reviews.llvm.org/D135685



More information about the llvm-commits mailing list