[llvm] r263821 - Typesafe visualization of PointerIntPairs in Visual Studio
Mike Spertus via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 18 13:06:17 PDT 2016
Author: mps
Date: Fri Mar 18 15:06:16 2016
New Revision: 263821
URL: http://llvm.org/viewvc/llvm-project?rev=263821&view=rev
Log:
Typesafe visualization of PointerIntPairs in Visual Studio
In the <DisplayString> of PointerIntPair , I cast the pointer to the actual type, so VS can leverage it while visualizing, not unlike the recent change to PointerUnion visualization.
In the expansion, the current code is casting to the incorrect type (wrong number of stars), so I fixed that as well.
Modified:
llvm/trunk/utils/llvm.natvis
Modified: llvm/trunk/utils/llvm.natvis
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/llvm.natvis?rev=263821&r1=263820&r2=263821&view=diff
==============================================================================
--- llvm/trunk/utils/llvm.natvis (original)
+++ llvm/trunk/utils/llvm.natvis Fri Mar 18 15:06:16 2016
@@ -46,9 +46,9 @@ or create a symbolic link so it updates
</Type>
<Type Name="llvm::PointerIntPair<*,*,*,*>">
- <DisplayString>{(void*)(Value & PointerBitMask)} [{($T3)((Value >> IntShift) & IntMask)}]</DisplayString>
+ <DisplayString>{IntMask}: {($T1)(Value & PointerBitMask)} [{($T3)((Value >> IntShift) & IntMask)}]</DisplayString>
<Expand>
- <Item Name="[ptr]">($T1*)(Value & PointerBitMask)</Item>
+ <Item Name="[ptr]">($T1)(Value & PointerBitMask)</Item>
<Item Name="[int]">($T3)((Value >> IntShift) & IntMask)</Item>
</Expand>
</Type>
More information about the llvm-commits
mailing list