Also improve DisplayStrings for array and string types.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
@curdeius I built these up over time and would like to upstream them.
Some of them may be out of date now and some things were tricky like the Uses/User stuff so I could use some feedback in general to polish it.
llvm/utils/LLVMVisualizers/llvm.natvis | ||
---|---|---|
32 | Any chance that we can have ArrayRef and SmallVectorImpl show a more similar representation? |
llvm/utils/LLVMVisualizers/llvm.natvis | ||
---|---|---|
32 | You mean simplifying SmallVector? |
llvm/utils/LLVMVisualizers/llvm.natvis | ||
---|---|---|
32 | Whichever is easier would be fine |
FWIW, the changes look reasonable to me. I don't do a whole lot of debugging in LLVM though, so I don't have a good feel for how well the visualizers work in practice.
llvm/utils/LLVMVisualizers/llvm.natvis | ||
---|---|---|
374 | Don't we already have a APInt entry near the top? |
llvm/utils/LLVMVisualizers/llvm.natvis | ||
---|---|---|
374 | Good catch. Back then it didn't exist. |
Cheers - LGTM with a couple of minors - setting "Tools->Options->Debugging->Ouput Window.NatvisDiagnosticMessages" to verbose seems to be (mostly) happy.
I'm wondering whether this needs to be sorted better (alphanumerically or by context) to make it easier to keep track of all the classes, but its not really that important.
llvm/utils/LLVMVisualizers/llvm.natvis | ||
---|---|---|
32 | 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. | |
305 | Does this work? It always seems to display "{llvm::SDNode ???}" for me |
llvm/utils/LLVMVisualizers/llvm.natvis | ||
---|---|---|
305 | Does it work for you? I'm using VS2022 here. Otherwise maybe we just cast to (llvm::ISD::NodeType) if < BUILTIN_OP_END ? We can keep the getOperationName call as the fallback |
llvm/utils/LLVMVisualizers/llvm.natvis | ||
---|---|---|
305 | It may have been an unfinished experiment. I replaced it with the NodeType to keep it simple. |
Any chance that we can have ArrayRef and SmallVectorImpl show a more similar representation?