From 7063a83a7cca45a9b12a7e447c90abe681f6ebaf 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. --- llvm/utils/LLVMVisualizers/llvm.natvis | 47 ++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/llvm/utils/LLVMVisualizers/llvm.natvis b/llvm/utils/LLVMVisualizers/llvm.natvis index 0000519..69d2026 100644 --- a/llvm/utils/LLVMVisualizers/llvm.natvis +++ b/llvm/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 + + -- 2.7.4