From 752a16bcdf7e40c7ce98a8dd938d74068861172f Mon Sep 17 00:00:00 2001 From: Mike Spertus Date: Sun, 2 Jun 2019 23:33:32 +0000 Subject: [PATCH] Update MSVC Visualizer to reflect new variadic PointerUnion This changed updates the MSVC Visualizer to work with the recent change of PointerUnion into a variadic template. As an extra bonus, we fix some bit rot in the SmallPtrSet visualizer as well llvm-svn: 362345 --- utils/LLVMVisualizers/llvm.natvis | 125 +++++++++++------------------- 1 file changed, 44 insertions(+), 81 deletions(-) diff --git a/utils/LLVMVisualizers/llvm.natvis b/utils/LLVMVisualizers/llvm.natvis index 42d3a122bec..edc533f9377 100644 --- a/utils/LLVMVisualizers/llvm.natvis +++ b/utils/LLVMVisualizers/llvm.natvis @@ -85,98 +85,61 @@ For later versions of Visual Studio, no setup is required. - + {$T5::IntMask}: {($T1)(Value & $T5::PointerBitMask)} [{($T3)((Value >> $T5::IntShift) & $T5::IntMask)}] ($T1)(Value & $T5::PointerBitMask) ($T3)((Value >> $T5::IntShift) & $T5::IntMask) - - - {*($T1)(Val.Value & ValTy::InfoTy::PointerBitMask)} - {*($T2)(Val.Value & ValTy::InfoTy::PointerBitMask)} - {"$T1", s8b}: {($T1)(Val.Value & ValTy::InfoTy::PointerBitMask)} - {"$T2", s8b}: {($T2)(Val.Value & ValTy::InfoTy::PointerBitMask)} + + + {*($T4)(Val.Value & $T2::InfoTy::PointerBitMask)} + + + {($T4)(Val.Value & $T2::InfoTy::PointerBitMask)} + + + {*($T5)(Val.Value & $T2::InfoTy::PointerBitMask)} + + + {($T5)(Val.Value & $T2::InfoTy::PointerBitMask)} + + + {*($T6)(Val.Value & $T2::InfoTy::PointerBitMask)} + + + {($T6)(Val.Value & $T2::InfoTy::PointerBitMask)} + + + {*($T7)(Val.Value & $T2::InfoTy::PointerBitMask)} + + + {($T7)(Val.Value & $T2::InfoTy::PointerBitMask)} + + Unexpected index in PointerUnion: {(Val.Value>>$T2::InfoTy::IntShift) & $T2::InfoTy::IntMask} - "$T1", s8b - ($T1)(Val.Value & ValTy::InfoTy::PointerBitMask) - "$T2", s8b - ($T2)(Val.Value & ValTy::InfoTy::PointerBitMask) - - - - - {Val,view(deref)} - {*(InnerUnion*)&Val.Val.Value,view(deref)} - {Val} - {*(InnerUnion*)&Val.Val.Value} - - "$T3", s8b - ($T3)(Val.Val.Value & ValTy::ValTy::InfoTy::PointerBitMask) - *(InnerUnion*)&Val.Val.Value - - - - - - {*($T1)(Val.Val.Value & InnerUnion1::ValTy::InfoTy::PointerBitMask)} - - - {*($T2)(Val.Val.Value & InnerUnion1::ValTy::InfoTy::PointerBitMask)} - - - {*($T3)(Val.Val.Value & InnerUnion2::ValTy::InfoTy::PointerBitMask)} - - - {*($T4)(Val.Val.Value & InnerUnion2::ValTy::InfoTy::PointerBitMask)} - - - {"$T1", s8b}: {($T1)(Val.Val.Value & InnerUnion1::ValTy::InfoTy::PointerBitMask)} - - - {"$T2", s8b}: {($T2)(Val.Val.Value & InnerUnion1::ValTy::InfoTy::PointerBitMask)} - - - {"$T3", s8b}: {($T3)(Val.Val.Value & InnerUnion2::ValTy::InfoTy::PointerBitMask)} - - - {"$T4", s8b}: {($T4)(Val.Val.Value & InnerUnion2::ValTy::InfoTy::PointerBitMask)} - - - - "$T1", s8b + "$T4",s8b + + ($T4)(Val.Value & $T2::InfoTy::PointerBitMask) - - ($T1)(Val.Val.Value & InnerUnion1::ValTy::InfoTy::PointerBitMask) + "$T5",s8b + + ($T5)(Val.Value & $T2::InfoTy::PointerBitMask) - - "$T2", s8b + "$T6",s8b + + ($T6)(Val.Value & $T2::InfoTy::PointerBitMask) - - ($T2)(Val.Val.Value & InnerUnion1::ValTy::InfoTy::PointerBitMask) - - - "$T3", s8b - - - ($T3)(Val.Val.Value & InnerUnion1::ValTy::InfoTy::PointerBitMask) - - - "$T4", s8b - - - ($T4)(Val.Val.Value & InnerUnion1::ValTy::InfoTy::PointerBitMask) + "$T6",s8b + + ($T7)(Val.Value & $T2::InfoTy::PointerBitMask) - + {{ empty }} {{ head={Head} }} @@ -200,13 +163,13 @@ For later versions of Visual Studio, no setup is required. - {{ [Small Mode] size={NumElements}, capacity={CurArraySize} }} - {{ [Big Mode] size={NumElements}, capacity={CurArraySize} }} + {{ [Small Mode] size={NumNonEmpty}, capacity={CurArraySize} }} + {{ [Big Mode] size={NumNonEmpty}, capacity={CurArraySize} }} - NumElements + NumNonEmpty CurArraySize - CurArraySize + NumNonEmpty ($T1*)CurArray