<Item Name="[underlying]" Condition="hasVal">*(($T1 *)(unsigned char *)storage.buffer)</Item>\r
</Expand>\r
</Type>\r
+\r
+ <!-- Since we're in MSVC, we can assume that the system is little endian. Therefore\r
+ the little and native cases just require a cast. Handle this easy case first. Use\r
+ a wildcard for the second template argument (the endianness), but we will use a\r
+ specific value of 0 later on for the big endian to give it priority for being a\r
+ better match. -->\r
+ <Type Name="llvm::support::detail::packed_endian_specific_integral<*,*,1>">\r
+ <DisplayString>{{little endian value = {*(($T1*)(unsigned char *)Value.buffer)} }}</DisplayString>\r
+ <Expand>\r
+ <Item Name="[Raw Bytes]" Condition="sizeof($T1)==1">(unsigned char *)Value.buffer,1</Item>\r
+ <Item Name="[Raw Bytes]" Condition="sizeof($T1)==2">(unsigned char *)Value.buffer,2</Item>\r
+ <Item Name="[Raw Bytes]" Condition="sizeof($T1)==4">(unsigned char *)Value.buffer,4</Item>\r
+ <Item Name="[Raw Bytes]" Condition="sizeof($T1)==8">(unsigned char *)Value.buffer,8</Item>\r
+ </Expand>\r
+ </Type>\r
+ \r
+ <!-- Now handle the hard case of big endian. We need to do the swizzling here, but\r
+ we need to specialize it based on the size of the value type. -->\r
+ <Type Name="llvm::support::detail::packed_endian_specific_integral<*,0,1>">\r
+ <DisplayString Condition="sizeof($T1)==1">{{ big endian value = {*(unsigned char *)Value.buffer} }}</DisplayString>\r
+ <DisplayString Condition="sizeof($T1)==2">{{ big endian value = {(($T1)(*(unsigned char *)Value.buffer) << 8) \r
+ | ($T1)(*((unsigned char *)Value.buffer+1))} }}</DisplayString>\r
+ <DisplayString Condition="sizeof($T1)==4">{{ big endian value = {(($T1)(*(unsigned char *)Value.buffer) << 24) \r
+ | (($T1)(*((unsigned char *)Value.buffer+1)) << 16) \r
+ | (($T1)(*((unsigned char *)Value.buffer+2)) << 8) \r
+ | ($T1)(*((unsigned char *)Value.buffer+3))} }}</DisplayString>\r
+ <DisplayString Condition="sizeof($T1)==8">{{ big endian value = {(($T1)(*(unsigned char *)Value.buffer) << 56) \r
+ | (($T1)(*((unsigned char *)Value.buffer+1)) << 48) \r
+ | (($T1)(*((unsigned char *)Value.buffer+2)) << 40) \r
+ | (($T1)(*((unsigned char *)Value.buffer+3)) << 32) \r
+ | (($T1)(*((unsigned char *)Value.buffer+4)) << 24) \r
+ | (($T1)(*((unsigned char *)Value.buffer+5)) << 16) \r
+ | (($T1)(*((unsigned char *)Value.buffer+6)) << 8) \r
+ | ($T1)(*((unsigned char *)Value.buffer+7))} }}</DisplayString>\r
+ <Expand>\r
+ <Item Name="[Raw Bytes]" Condition="sizeof($T1)==1">(unsigned char *)Value.buffer,1</Item>\r
+ <Item Name="[Raw Bytes]" Condition="sizeof($T1)==2">(unsigned char *)Value.buffer,2</Item>\r
+ <Item Name="[Raw Bytes]" Condition="sizeof($T1)==4">(unsigned char *)Value.buffer,4</Item>\r
+ <Item Name="[Raw Bytes]" Condition="sizeof($T1)==8">(unsigned char *)Value.buffer,8</Item>\r
+ </Expand>\r
+ </Type>\r
</AutoVisualizer>\r