From 086582cdf85dcd2351fe66b6b720f2801a06058b Mon Sep 17 00:00:00 2001 From: Machiel van Hooren Date: Fri, 15 May 2020 09:38:37 -0400 Subject: [PATCH] Add MSVC natvis visualisation of llvm::Type llvm::Type has some difficult to decode member variables with different meanings depending on the TypeID. Specifically SubclassData and ContainedTys. This natvis visualisation decodes and visualises those members. --- utils/LLVMVisualizers/llvm.natvis | 47 +++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/utils/LLVMVisualizers/llvm.natvis b/utils/LLVMVisualizers/llvm.natvis index 0000519ce05..69d2026feb3 100644 --- a/utils/LLVMVisualizers/llvm.natvis +++ b/utils/LLVMVisualizers/llvm.natvis @@ -253,4 +253,51 @@ For later versions of Visual Studio, no setup is required. (unsigned char *)Value.buffer,8 + + + {ID} + + ID + + SubclassData + + *ContainedTys + + {NumContainedTys - 1} + + + NumContainedTys - 1 + ContainedTys + 1 + + + + SubclassData == 1 + + (SubclassData & llvm::StructType::SCDB_HasBody) != 0 + (SubclassData & llvm::StructType::SCDB_Packed) != 0 + (SubclassData & llvm::StructType::SCDB_IsLiteral) != 0 + (SubclassData & llvm::StructType::SCDB_IsSized) != 0 + + {NumContainedTys} + + + NumContainedTys + ContainedTys + + + + + *ContainedTys + ((llvm::ArrayType*)this)->NumElements + + SubclassData + *ContainedTys + + ((llvm::VectorType*)this)->NumElements + + Context + +