Created
November 5, 2013 01:17
-
-
Save tritao/7312257 to your computer and use it in GitHub Desktop.
LLVM & Clang Natvis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> | |
<Type Name="clang::Stmt"> | |
<Expand> | |
<Item Name="Statement Class">(Stmt::StmtClass)StmtBits.sClass</Item> | |
</Expand> | |
</Type> | |
<Type Name="clang::Expr"> | |
<Expand> | |
<Item Name="Type">TR</Item> | |
<ExpandedItem>*(clang::Stmt*)this,nd</ExpandedItem> | |
<Item Name="Object Kind">(ExprObjectKind)ExprBits.ObjectKind</Item> | |
<Item Name="Type Dependent">(bool)ExprBits.TypeDependent</Item> | |
<Item Name="Value Dependent">(bool)ExprBits.ValueDependent</Item> | |
<Item Name="Instantiation Dependent">(bool)ExprBits.InstantiationDependent</Item> | |
<Item Name="Unexpanded Parameter Pack">(bool)ExprBits.ContainsUnexpandedParameterPack</Item> | |
</Expand> | |
</Type> | |
<Type Name="clang::MemberExpr"> | |
<Expand> | |
<ExpandedItem>*(clang::Expr*)this,nd</ExpandedItem> | |
<Item Name="Base">Base</Item> | |
<Item Name="Member Declaration">MemberDecl</Item> | |
<Item Name="Member Declaration Name">MemberDNLoc</Item> | |
<Item Name="IsArrow">IsArrow</Item> | |
<Item Name="HasQualifierOrFoundDecl">HasQualifierOrFoundDecl</Item> | |
<Item Name="HasTemplateKWAndArgsInfo">HasTemplateKWAndArgsInfo</Item> | |
<Item Name="HadMultipleCandidates">HadMultipleCandidates</Item> | |
<Item Name="MemberNameQualifier" Condition="HasQualifierOrFoundDecl">(MemberNameQualifier *)(this+1)</Item> | |
</Expand> | |
</Type> | |
<Type Name="clang::InitListExpr"> | |
<Expand> | |
<ExpandedItem>*(clang::Expr*)this,nd</ExpandedItem> | |
<Item Name="Inits">InitExprs</Item> | |
</Expand> | |
</Type> | |
<Type Name="clang::ASTVector<*>"> | |
<DisplayString>{{ size={($T1*)End - ($T1*)Begin}, capacity={($T1*)Capacity - ($T1*)Begin} }}</DisplayString> | |
<Expand> | |
<Item Name="[size]">($T1*)End - ($T1*)Begin</Item> | |
<Item Name="[capacity]">($T1*)Capacity - ($T1*)Begin</Item> | |
<ArrayItems> | |
<Size>($T1*)End - ($T1*)Begin</Size> | |
<ValuePointer>($T1*)Begin</ValuePointer> | |
</ArrayItems> | |
</Expand> | |
</Type> | |
<Type Name="clang::ActionResult<*,0>"> | |
<Expand> | |
<Item Name="Invalid">Invalid</Item> | |
<Item Name="Value" Condition="!Invalid">($T1)Val</Item> | |
</Expand> | |
</Type> | |
<Type Name="clang::ActionResult<*,*>"> | |
<Expand> | |
<Item Name="Invalid">(bool)(PtrWithInvalid & 0x01)</Item> | |
<Item Name="Value" Condition="PtrWithInvalid > 0x01">($T1)(PtrWithInvalid & ~0x01)</Item> | |
</Expand> | |
</Type> | |
<Type Name="clang::QualType"> | |
<Expand> | |
<ExpandedItem>Value</ExpandedItem> | |
</Expand> | |
</Type> | |
<Type Name="clang::CanQualType"> | |
<Expand> | |
<ExpandedItem>Stored</ExpandedItem> | |
</Expand> | |
</Type> | |
<Type Name="clang::CanQual<*>"> | |
<Expand> | |
<ExpandedItem>Stored</ExpandedItem> | |
</Expand> | |
</Type> | |
<Type Name="clang::Type"> | |
<Expand> | |
<Item Name="Type Class">(Type::TypeClass)TypeBits.TC</Item> | |
<Item Name="Dependent">(bool)TypeBits.Dependent</Item> | |
<Item Name="Instantiation Dependent">(bool)TypeBits.InstantiationDependent</Item> | |
<Item Name="Variably Modified">(bool)TypeBits.VariablyModified</Item> | |
<Item Name="Unexpanded Parameter Pack">(bool)TypeBits.ContainsUnexpandedParameterPack</Item> | |
<Item Name="Cache Valid">TypeBits.CacheValidAndVisibility != 0</Item> | |
<Item Name="Visibility" Condition="TypeBits.CacheValidAndVisibility != 0">(Visibility)(TypeBits.CacheValidAndVisibility-1)</Item> | |
<Item Name="Explicit Visibility" Condition="TypeBits.CacheValidAndVisibility != 0">(bool)TypeBits.CachedExplicitVisibility</Item> | |
<Item Name="Linkage" Condition="TypeBits.CacheValidAndVisibility != 0">(Linkage)TypeBits.CachedLinkage</Item> | |
<Item Name="Local or Unnamed Type" Condition="TypeBits.CacheValidAndVisibility != 0">TypeBits.CachedLocalOrUnnamed</Item> | |
<Item Name="From AST">TypeBits.FromAST</Item> | |
<ExpandedItem Condition="TypeBits.TC == 0">*(clang::BuiltinType*)this,nd</ExpandedItem> | |
<Item Name="Pointee" Condition="TypeBits.TC == 40">(*(clang::HandleType*)this).PointeeType,nd</Item> | |
<Item Name="Record" Condition="TypeBits.TC == 23">*(clang::RecordType*)this,nd</Item> | |
</Expand> | |
</Type> | |
<Type Name="clang::RecordType"> | |
<Expand> | |
<Item Name="Decl">(RecordDecl*)decl</Item> | |
</Expand> | |
</Type> | |
<Type Name="clang::BuiltinType"> | |
<Expand> | |
<!--<ExpandedItem>*(clang::Type*)this,nd</ExpandedItem>--> | |
<Item Name="Builtin Kind">(BuiltinType::Kind)BuiltinTypeBits.Kind</Item> | |
</Expand> | |
</Type> | |
<Type Name="clang::IdentifierInfo"> | |
<DisplayString>{(clang::tok::TokenKind)TokenID}</DisplayString> | |
<Expand> | |
<Item Name="Token Kind">(clang::tok::TokenKind)TokenID</Item> | |
<!--<Item Name="ObjC Kind" Condition="ObjCOrBuiltinID < clang::tok::NUM_OBJC_KEYWORDS">(clang::tok::ObjCKeywordKind)ObjCOrBuiltinID</Item> | |
<Item Name="Builtin Kind" Condition="ObjCOrBuiltinID >= clang::tok::NUM_OBJC_KEYWORDS">ObjCOrBuiltinID - clang::tok::NUM_OBJC_KEYWORDS</Item>--> | |
</Expand> | |
</Type> | |
<Type Name="clang::DeclarationName"> | |
<Expand> | |
<Item Name="Stored Name Kind">(StoredNameKind)(Ptr & PtrMask)</Item> | |
<Item Name="Ptr" Condition="(StoredNameKind)(Ptr & PtrMask) == StoredIdentifier">(IdentifierInfo*)Ptrd</Item> | |
</Expand> | |
</Type> | |
<Type Name="clang::Token"> | |
<Expand> | |
<Item Name="Kind">(clang::tok::TokenKind)Kind</Item> | |
</Expand> | |
</Type> | |
<Type Name="clang::TemplateArgument"> | |
<Expand> | |
<Item Name="Kind">(clang::TemplateArgument::ArgKind)Kind</Item> | |
</Expand> | |
</Type> | |
<Type Name="clang::TemplateArgument"> | |
<Expand> | |
<Item Name="Kind">(clang::TemplateArgument::ArgKind)Kind</Item> | |
</Expand> | |
</Type> | |
</AutoVisualizer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> | |
<Type Name="llvm::StringRef"> | |
<DisplayString>{Data,s}</DisplayString> | |
<StringView>Data,s</StringView> | |
<Expand> | |
<Item Name="[size]">Length</Item> | |
<Item Name="[data]">Data,s</Item> | |
</Expand> | |
</Type> | |
<Type Name="llvm::SmallVector<*>"> | |
<AlternativeType Name="llvm::SmallVectorImpl<*>" /> | |
<AlternativeType Name="llvm::SmallVectorTemplateBase<*,*>" /> | |
<AlternativeType Name="llvm::SmallVectorTemplateCommon<*,*>" /> | |
<!-- <AlternativeType Name="llvm::SmallString<*>" /> --> | |
<!-- <AlternativeType Name="llvm::SmallVectorBase" /> --> | |
<DisplayString>{{ size={($T1*)EndX - ($T1*)BeginX}, capacity={($T1*)CapacityX - ($T1*)BeginX} }}</DisplayString> | |
<Expand> | |
<Item Name="[size]">($T1*)EndX - ($T1*)BeginX</Item> | |
<Item Name="[capacity]">($T1*)CapacityX - ($T1*)BeginX</Item> | |
<!--<Item Condition="$T2 != 0" Name="[inline-storage]">{$T2}</Item>--> | |
<ArrayItems> | |
<Size>($T1*)EndX - ($T1*)BeginX</Size> | |
<ValuePointer>($T1*)BeginX</ValuePointer> | |
</ArrayItems> | |
</Expand> | |
</Type> | |
<Type Name="llvm::SmallString<*>"> | |
<DisplayString>{(char*)BeginX,$T1s}</DisplayString> | |
<Expand> | |
<Item Name="[size]">(char*)EndX - (char*)BeginX</Item> | |
<Item Name="[capacity]">(char*)CapacityX - (char*)BeginX</Item> | |
<Item Name="[data]">(char*)BeginX,$T1s</Item> | |
</Expand> | |
</Type> | |
<Type Name="llvm::PointerIntPair<*,*,*,*>"> | |
<DisplayString>ptr={($T1*)&Value} value={($T3)((Value >> IntShift) & IntMask)}</DisplayString> | |
<Expand> | |
<Item Name="[ptr]">($T1*)&Value</Item> | |
<Item Name="[value]">($T3)((Value >> IntShift) & IntMask)</Item> | |
</Expand> | |
</Type> | |
<Type Name="llvm::PointerUnion<*,*>"> | |
<DisplayString Condition="((Val.Value >> Val.IntShift) & Val.IntMask) == 0">P1</DisplayString> | |
<DisplayString Condition="((Val.Value >> Val.IntShift) & Val.IntMask) != 0">P2</DisplayString> | |
<Expand> | |
<ExpandedItem Condition="((Val.Value >> Val.IntShift) & Val.IntMask) == 0">($T1)(Val.Value & Val.PointerBitMask)</ExpandedItem> | |
<ExpandedItem Condition="((Val.Value >> Val.IntShift) & Val.IntMask) != 0">($T2)(Val.Value & Val.PointerBitMask)</ExpandedItem> | |
</Expand> | |
</Type> | |
<Type Name="llvm::PointerUnion4<*,*,*,*>"> | |
<Expand> | |
<ExpandedItem>Val</ExpandedItem> | |
</Expand> | |
</Type> | |
<Type Name="llvm::Type"> | |
<Expand> | |
<Item Name="Type ID">(TypeID)(IDAndSubclassData & 0xFF)</Item> | |
<Item Name="[ptr]" Condition="((TypeID)(IDAndSubclassData & 0xFF)) == Type::PointerTyID" >ContainedTys[0]</Item> | |
</Expand> | |
</Type> | |
</AutoVisualizer> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment