<?xml version="1.0" encoding="utf-8"?>\r
<!--\r
-Visual Studio 2012 Native Debugging Visualizers for LLVM\r
+Visual Studio Native Debugging Visualizers for LLVM\r
\r
-Put this file into "%USERPROFILE%\Documents\Visual Studio 2012\Visualizers"\r
+Put this file into "%USERPROFILE%\Documents\Visual Studio 20xx\Visualizers"\r
or create a symbolic link so it updates automatically.\r
-->\r
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">\r
<Type Name="clang::Type">\r
- <DisplayString Condition="(clang::Type::TypeClass)TypeBits.TC == clang::Type::Builtin">Builtin Type={(clang::BuiltinType::Kind)BuiltinTypeBits.Kind}</DisplayString>\r
- <DisplayString Condition="(clang::Type::TypeClass)TypeBits.TC == clang::Type::Attributed">Modified Type={((clang::AttributedType*)this)->ModifiedType} Attribute={(clang::AttributedType::Kind)AttributedTypeBits.AttrKind}</DisplayString>\r
- <DisplayString>Type Class={(clang::Type::TypeClass)TypeBits.TC}</DisplayString>\r
+ <DisplayString IncludeView="BaseOnly">{(clang::Type::TypeClass)TypeBits.TC, en}</DisplayString>\r
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Builtin">Builtin Type={*(clang::BuiltinType *)this}</DisplayString>\r
+ <DisplayString Condition="TypeBits.TC==clang::Type::Attributed">Modified Type={((clang::AttributedType*)this)->ModifiedType} Attribute={(clang::AttributedType::Kind)AttributedTypeBits.AttrKind}</DisplayString>\r
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::SubstTemplateTypeParm">{*(clang::SubstTemplateTypeParmType *)this}</DisplayString>\r
+ <DisplayString Condition="TypeBits.TC==clang::Type::TypeClass::Record">{*(clang::RecordType *)this}</DisplayString>\r
+ <DisplayString>{(clang::Type::TypeClass)TypeBits.TC, en}</DisplayString>\r
+ <Expand>\r
+ <Item Name="TypeClass" IncludeView="BaseOnly">(clang::Type::TypeClass)TypeBits.TC</Item>\r
+ <Item Name="Flags" IncludeView="BaseOnly">TypeBits</Item>\r
+ <Item Name="Canonical" IncludeView="BaseOnly">CanonicalType</Item>\r
+ <ExpandedItem ExcludeView="BaseOnly" Condition="TypeBits.TC==clang::Type::TypeClass::Builtin">*(clang::BuiltinType *)this</ExpandedItem>\r
+ <ExpandedItem ExcludeView="BaseOnly" Condition="TypeBits.TC==clang::Type::TypeClass::SubstTemplateTypeParm">(clang::SubstTemplateTypeParmType *)this</ExpandedItem>\r
+ <ExpandedItem ExcludeView="BaseOnly" Condition="TypeBits.TC==clang::Type::TypeClass::Record">(clang::RecordType *)this</ExpandedItem>\r
+ </Expand>\r
+ </Type>\r
+ <Type Name="clang::TagType">\r
+ <DisplayString>{*decl}</DisplayString>\r
+ <Expand>\r
+ <Item Name="decl">decl</Item>\r
+ </Expand>\r
+ </Type>\r
+ <Type Name="clang::RecordType">\r
+ <DisplayString>{*(clang::Type *)this, view(BaseOnly)}, {*(clang::TagType *)this}</DisplayString>\r
+ <Expand>\r
+ <Item Name="TagType">*(clang::TagType *)this</Item>\r
+ </Expand>\r
+ </Type>\r
+ <Type Name="clang::SubstTemplateTypeParmType">\r
+ <DisplayString>{*(clang::Type *)this, view(BaseOnly)}: {*Replaced} => {CanonicalType}</DisplayString>\r
+ <Expand>\r
+ <ExpandedItem>*(clang::Type *)this, view(BaseOnly)</ExpandedItem>\r
+ <Item Name="Replaced">*Replaced</Item>\r
+ </Expand>\r
+ </Type>\r
+ <Type Name="clang::TemplateTypeParmType">\r
+ <DisplayString>{*TTPDecl}</DisplayString>\r
</Type>\r
<Type Name="clang::QualType">\r
- <DisplayString>{((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) & ~(uintptr_t)((1 << clang::TypeAlignmentInBits) - 1)))->BaseType}</DisplayString>\r
+ <!-- TODO: Qualifiers. Also, when VS2013 support is deprecated, change 4 to clang::TypeAlignmentInBits (not properly recognized by VS2013) -->\r
+ <DisplayString>{*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) & ~(uintptr_t)((1 << 4) - 1)))->BaseType}</DisplayString>\r
+ <Expand>\r
+ <Item Name="BaseType">*((clang::ExtQualsTypeCommonBase *)(((uintptr_t)Value.Value) & ~(uintptr_t)((1 << 4) - 1)))->BaseType</Item>\r
+ </Expand>\r
+ </Type>\r
+ <Type Name="clang::TemplateArgumentLoc">\r
+ <DisplayString>{Argument}</DisplayString>\r
+ <Expand>\r
+ <ExpandedItem>Argument</ExpandedItem>\r
+ </Expand>\r
+ </Type>\r
+ <Type Name="clang::TemplateArgument">\r
+ <DisplayString>{(clang::TemplateArgument::ArgKind)TypeOrValue.Kind,en} template parameter: {*(clang::QualType *)&TypeOrValue.V}</DisplayString>\r
+ <Expand>\r
+ <Item Name="QualType" Condition="Integer.Kind == clang::TemplateArgument::ArgKind::Type">*(clang::QualType *)&TypeOrValue.V</Item>\r
+ <!-- TODO: Other kinds-->\r
+ </Expand>\r
+ </Type>\r
+ <Type Name="clang::BuiltinType">\r
+ <DisplayString>{(clang::BuiltinType::Kind)BuiltinTypeBits.Kind, en}</DisplayString>\r
+ <Expand>\r
+ <Item Name="Kind">(clang::BuiltinType::Kind)BuiltinTypeBits.Kind</Item>\r
+ </Expand>\r
+ </Type>\r
+ <Type Name="clang::NamedDecl">\r
+ <DisplayString>{Name}</DisplayString>\r
+ </Type>\r
+ <Type Name="clang::TemplateSpecializationType">\r
+ <DisplayString Condition="(Template.Storage.Val.Val.Value & 3) != 3 && (Template.Storage.Val.Val.Value & 2) != 2 && (Template.Storage.Val.Val.Value & 1) != 1">{(clang::TemplateDecl *)((Template.Storage.Val.Val.Value >> 2) << 2)}</DisplayString>\r
+ <DisplayString>{Template.Storage}</DisplayString>\r
</Type>\r
<Type Name="clang::IdentifierInfo">\r
<DisplayString Condition="Entry != 0">({((llvm::StringMapEntry<clang::IdentifierInfo *>*)Entry)+1,s})</DisplayString>\r
<Item Condition="(Ptr & PtrMask) == StoredObjCZeroArgSelector" Name="[ObjC Zero Arg Selector]">*(clang::IdentifierInfo *)(Ptr & ~PtrMask)</Item>\r
<Item Condition="(Ptr & PtrMask) == StoredObjCOneArgSelector" Name="[ObjC One Arg Selector]">*(clang::IdentifierInfo *)(Ptr & ~PtrMask)</Item>\r
<Item Condition="(Ptr & PtrMask) == StoredDeclarationNameExtra" Name="[Extra]">(clang::DeclarationNameExtra::ExtraKind)((clang::DeclarationNameExtra *)(Ptr & ~PtrMask))->ExtraKindOrNumArgs</Item>\r
- </Expand>
- </Type>
- <Type Name="clang::Token">
- <DisplayString Condition="Kind != clang::tok::identifier">{(clang::tok::TokenKind)Kind}</DisplayString>
- <DisplayString Condition="Kind == clang::tok::identifier">{{Identifier ({*(clang::IdentifierInfo *)(PtrData)})}}</DisplayString>
- </Type>
- <Type Name="clang::DeclSpec">
- <DisplayString>[{(clang::DeclSpec::SCS)StorageClassSpec}], [{(clang::TypeSpecifierType)TypeSpecType}]</DisplayString>
+ </Expand>\r
+ </Type>\r
+ <Type Name="clang::Token">\r
+ <DisplayString Condition="Kind != clang::tok::identifier">{(clang::tok::TokenKind)Kind,en}</DisplayString>\r
+ <DisplayString Condition="Kind == clang::tok::identifier">{{Identifier ({*(clang::IdentifierInfo *)(PtrData)})}}</DisplayString>\r
+ </Type>\r
+ <Type Name="clang::DeclSpec">\r
+ <DisplayString>[{(clang::DeclSpec::SCS)StorageClassSpec}], [{(clang::TypeSpecifierType)TypeSpecType}]</DisplayString>\r
</Type>\r
<Type Name="clang::PragmaHandler">\r
<DisplayString>{Name,s}</DisplayString>\r
<Item Name="ParmVarDeclBits">ParmVarDeclBits</Item>\r
</Expand>\r
</Type>\r
+ <Type Name="clang::OpaquePtr<*>">\r
+ <DisplayString>{($T1 *)Ptr</DisplayString>\r
+ <Expand>\r
+ <ExpandedItem>($T1 *)Ptr</ExpandedItem>\r
+ </Expand>\r
+ </Type>\r
</AutoVisualizer>\r