r200032 - Since Visual Studio 2012 is the minimum version of MSVC we support, the old-style visualizers are being removed. Adding a Natvis replacement for the debugging visualizers.
Aaron Ballman
aaron at aaronballman.com
Fri Jan 24 11:46:46 PST 2014
Author: aaronballman
Date: Fri Jan 24 13:46:45 2014
New Revision: 200032
URL: http://llvm.org/viewvc/llvm-project?rev=200032&view=rev
Log:
Since Visual Studio 2012 is the minimum version of MSVC we support, the old-style visualizers are being removed. Adding a Natvis replacement for the debugging visualizers.
Added:
cfe/trunk/utils/clang.natvis
Removed:
cfe/trunk/utils/clangVisualizers.txt
Added: cfe/trunk/utils/clang.natvis
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/clang.natvis?rev=200032&view=auto
==============================================================================
--- cfe/trunk/utils/clang.natvis (added)
+++ cfe/trunk/utils/clang.natvis Fri Jan 24 13:46:45 2014
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Visual Studio 2012 Native Debugging Visualizers for LLVM
+
+Put this file into "%USERPROFILE%\Documents\Visual Studio 2012\Visualizers"
+or create a symbolic link so it updates automatically.
+-->
+<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
+ <Type Name="clang::IdentifierInfo">
+ <DisplayString Condition="Entry != 0">({((llvm::StringMapEntry<clang::IdentifierInfo *>*)Entry)+1,s})</DisplayString>
+ <Expand>
+ <Item Condition="Entry != 0" Name="[Identifier]">((llvm::StringMapEntry<clang::IdentifierInfo *>*)Entry)+1,s</Item>
+ <Item Name="Token Kind">(clang::tok::TokenKind)TokenID</Item>
+ </Expand>
+ </Type>
+ <Type Name="clang::DeclarationName">
+ <DisplayString Condition="Ptr == 0">Empty</DisplayString>
+ <DisplayString Condition="(Ptr & PtrMask) == StoredIdentifier">{{Identifier ({(clang::IdentifierInfo *)(Ptr & ~PtrMask)})}}</DisplayString>
+ <DisplayString Condition="(Ptr & PtrMask) == StoredObjCZeroArgSelector">{{ObjC Zero Arg Selector ({(clang::IdentifierInfo *)(Ptr & ~PtrMask)})}}</DisplayString>
+ <DisplayString Condition="(Ptr & PtrMask) == StoredObjCOneArgSelector">{{ObjC One Arg Selector ({(clang::IdentifierInfo *)(Ptr & ~PtrMask)})}}</DisplayString>
+ <DisplayString Condition="(Ptr & PtrMask) == StoredDeclarationNameExtra">{{Extra ({(clang::DeclarationNameExtra::ExtraKind)((clang::DeclarationNameExtra *)(Ptr & ~PtrMask))->ExtraKindOrNumArgs})}}</DisplayString>
+ <Expand>
+ <Item Condition="(Ptr & PtrMask) == StoredIdentifier" Name="[Identifier]">(clang::IdentifierInfo *)(Ptr & ~PtrMask)</Item>
+ <Item Condition="(Ptr & PtrMask) == StoredObjCZeroArgSelector" Name="[ObjC Zero Arg Selector]">(clang::IdentifierInfo *)(Ptr & ~PtrMask)</Item>
+ <Item Condition="(Ptr & PtrMask) == StoredObjCOneArgSelector" Name="[ObjC One Arg Selector]">(clang::IdentifierInfo *)(Ptr & ~PtrMask)</Item>
+ <Item Condition="(Ptr & PtrMask) == StoredDeclarationNameExtra" Name="[Extra]">(clang::DeclarationNameExtra::ExtraKind)((clang::DeclarationNameExtra *)(Ptr & ~PtrMask))->ExtraKindOrNumArgs</Item>
+ </Expand>
+ </Type>
+ <Type Name="clang::Token">
+ <DisplayString>{(clang::tok::TokenKind)Kind}</DisplayString>
+ </Type>
+ <Type Name="clang::DeclSpec">
+ <DisplayString>[{(clang::DeclSpec::SCS)StorageClassSpec}], [{(clang::TypeSpecifierType)TypeSpecType}]</DisplayString>
+ </Type>
+ <Type Name="clang::PragmaHandler">
+ <DisplayString>{Name,s}</DisplayString>
+ </Type>
+ <Type Name="clang::FileEntry">
+ <DisplayString>{Name,s}</DisplayString>
+ </Type>
+ <Type Name="clang::DirectoryEntry">
+ <DisplayString>{Name,s}</DisplayString>
+ </Type>
+</AutoVisualizer>
Removed: cfe/trunk/utils/clangVisualizers.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/clangVisualizers.txt?rev=200031&view=auto
==============================================================================
--- cfe/trunk/utils/clangVisualizers.txt (original)
+++ cfe/trunk/utils/clangVisualizers.txt (removed)
@@ -1,391 +0,0 @@
-
-[Visualizer]
-
-llvm::SmallVector<*,*>{
- preview (
- #if ((($T1*)$e.EndX - ($T1*)$e.BeginX) == 0) ( "empty" )
- #else (
- #(
- "[",
- ($T1*)$e.EndX - ($T1*)$e.BeginX,
- "](",
- #array(
- expr: (($T1*)$e.BeginX)[$i],
- size: ($T1*)$e.EndX - ($T1*)$e.BeginX
- ),
- ")"
- )
- )
- )
-
- children (
- #(
- #([size] : ($T1*)$e.EndX - ($T1*)$e.BeginX),
- #([capacity] : ($T1*)$e.CapacityX - ($T1*)$e.BeginX),
- #array(
- expr: (($T1*)$e.BeginX)[$i],
- size: ($T1*)$e.EndX - ($T1*)$e.BeginX
- )
- )
- )
-}
-
-llvm::SmallVectorImpl<*>{
- preview (
- #if ((($T1*)$e.EndX - ($T1*)$e.BeginX) == 0) ( "empty" )
- #else (
- #(
- "[",
- ($T1*)$e.EndX - ($T1*)$e.BeginX,
- "](",
- #array(
- expr: (($T1*)$e.BeginX)[$i],
- size: ($T1*)$e.EndX - ($T1*)$e.BeginX
- ),
- ")"
- )
- )
- )
-
- children (
- #(
- #([size] : ($T1*)$e.EndX - ($T1*)$e.BeginX),
- #([capacity] : ($T1*)$e.CapacityX - ($T1*)$e.BeginX),
- #array(
- expr: (($T1*)$e.BeginX)[$i],
- size: ($T1*)$e.EndX - ($T1*)$e.BeginX
- )
- )
- )
-}
-
-llvm::SmallString<*>{
- preview ([$e.BeginX,s])
- stringview ([$e.BeginX,sb])
-}
-
-llvm::StringRef{
- preview ([$e.Data,s])
- stringview ([$e.Data,sb])
-
- children (
- #(
- #([size] : $e.Length),
- #array(expr: $e.Data[$i], size: $e.Length)
- )
- )
-}
-
-clang::Token{
- preview((clang::tok::TokenKind)(int)$e.Kind)
-}
-
-llvm::PointerIntPair<*,*,*,*>{
- preview (
- #(
- ($T1*)($e.Value & $e.PointerBitMask),
- " [",
- ($T3)(($e.Value >> $e.IntShift) & $e.IntMask),
- "]"
- )
- )
-
- children (
- #(
- #([raw members] : [$e,!]),
- #([ptr] : ($T1*)($e.Value & $e.PointerBitMask)),
- #([int] : ($T3)($e.Value >> $e.IntShift) & $e.IntMask)
- )
- )
-}
-
-llvm::PointerUnion<*,*>{
- preview (
- #if ((($e.Val.Value >> $e.Val.IntShift) & $e.Val.IntMask) == 0) ( "PT1" )
- #else ( "PT2" )
- )
-
- children (
- #(
- #([raw members] : [$e,!]),
- #if ((($e.Val.Value >> $e.Val.IntShift) & $e.Val.IntMask) == 0) (
- #([ptr] : ($T1)($e.Val.Value & $e.Val.PointerBitMask))
- ) #else (
- #([ptr] : ($T2)($e.Val.Value & $e.Val.PointerBitMask))
- )
- )
- )
-}
-
-llvm::PointerUnion3<*,*,*>{
- preview (
- #if (($e.Val.Val.Value & 0x2) == 2) ( "PT2" )
- #elif (($e.Val.Val.Value & 0x1) == 1) ( "PT3" )
- #else ( "PT1" )
- )
-
- children (
- #(
- #if (($e.Val.Val.Value & 0x2) == 2) (
- #([ptr] : ($T2)(($e.Val.Val.Value >> 2) << 2))
- ) #elif (($e.Val.Val.Value & 0x1) == 1) (
- #([ptr] : ($T3)(($e.Val.Val.Value >> 2) << 2))
- ) #else (
- #([ptr] : ($T1)(($e.Val.Val.Value >> 2) << 2))
- )
- )
- )
-}
-
-llvm::PointerUnion4<*,*,*,*>{
- preview (
- #if (($e.Val.Val.Value & 0x3) == 3) ( "PT4" )
- #elif (($e.Val.Val.Value & 0x2) == 2) ( "PT2" )
- #elif (($e.Val.Val.Value & 0x1) == 1) ( "PT3" )
- #else ( "PT1" )
- )
-
- children (
- #(
- #if (($e.Val.Val.Value & 0x3) == 3) (
- #([ptr] : ($T4)(($e.Val.Val.Value >> 2) << 2))
- ) #elif (($e.Val.Val.Value & 0x2) == 2) (
- #([ptr] : ($T2)(($e.Val.Val.Value >> 2) << 2))
- ) #elif (($e.Val.Val.Value & 0x1) == 1) (
- #([ptr] : ($T3)(($e.Val.Val.Value >> 2) << 2))
- ) #else (
- #([ptr] : ($T1)(($e.Val.Val.Value >> 2) << 2))
- )
- )
- )
-}
-
-llvm::IntrusiveRefCntPtr<*>{
- preview (
- #if ($e.Obj == 0) ( "empty" )
- #else (
- #(
- "[RefCnt=", $e.Obj->ref_cnt,
- ", ",
- "Obj=", $e.Obj,
- "]"
- )
- )
- )
-
- children (
- #if ($e.Obj == 0) ( #array(expr: 0, size: 0) )
- #else (
- #(
- #(RefCnt : $e.Obj->ref_cnt),
- #(Obj : $e.Obj)
- )
- )
- )
-}
-
-llvm::OwningPtr<*>{
- preview (
- #if ($e.Ptr == 0) ( "empty" )
- #else ( $e.Ptr )
- )
-
- children (
- #if ($e.Ptr == 0) ( #array(expr: 0, size: 0) )
- #else ( #(Ptr : $e.Ptr) )
- )
-}
-
-llvm::SmallPtrSet<*,*>{
- preview (
- #(
- #if (($e.CurArray) == ($e.SmallArray)) ( "[Small Mode] " )
- #else ( "[Big Mode] " ),
- "NumElements=", $e.NumElements,
- " CurArraySize=", $e.CurArraySize
- )
- )
-
- children (
- #(
- #([raw members] : [$c,!]),
- #(NumElements : $e.NumElements),
- #(CurArraySize : $e.CurArraySize),
- #array(
- expr: $e.CurArray[$i],
- size: $e.CurArraySize + 1
- ) : ($T1*)&$e
- )
- )
-}
-
-llvm::DenseMap<*,*,*>{
- preview (
- #if ($e.NumEntries == 0) ( "empty" )
- #else (
- #(
- "[NumEntries=", $e.NumEntries,
- " NumBuckets=", $e.NumBuckets,
- "]"
- )
- )
- )
-
- children (
- #if ($e.NumEntries == 0) ( #array(expr: 0, size: 0) )
- #else (
- #(
- #([raw members] : [$c,!]),
- #(NumEntries : $e.NumEntries),
- #(NumBuckets : $e.NumBuckets),
- #array(
- expr: $e.Buckets[$i],
- size: $e.NumBuckets
- )
- )
- )
- )
-}
-
-llvm::StringMap<*,*>{
- preview (
- #(
- "[NumBuckets=", $e.NumBuckets,
- " ItemSize=", $e.ItemSize,
- "]"
- )
- )
-
- children (
- #(
- #([raw members] : [$c,!]),
- #(NumBuckets : $e.NumBuckets),
- #(ItemSize : $e.ItemSize),
- #array(
- expr: $e.TheTable[$i],
- size: $e.NumBuckets,
- ) : (llvm::StringMapEntry<$T1>*)&$e
- )
- )
-}
-
-llvm::StringMapEntry<*>{
- preview (
- #if ($e.StrLen == 0) ( "empty" )
- #else ( #(Entry : $e.second) )
- )
-
- children (
- #if ($e.StrLen == 0) ( "empty" )
- #else ( #(Entry : $e.second) )
- )
-}
-
-clang::DirectoryEntry|clang::FileEntry|clang::PragmaHandler{
- preview ( [$e.Name,s] )
- children (
- #(
- #([raw members] : [$c,!]),
- #(Name : [$e.Name,s])
- )
- )
-}
-
-clang::DeclarationName{
- preview (
- ; enum values from clang::DeclarationName::StoredNameKind
- #if ($e.Ptr == 0) (
- "empty"
- ) #elif (($e.Ptr & $e.PtrMask) == $e.StoredIdentifier) (
- #else ( #("Identifier, ", (clang::IdentifierInfo*)($e.Ptr & ~$e.PtrMask)) )
- ) #elif (($e.Ptr & $e.PtrMask) == $e.StoredObjCZeroArgSelector) (
- #("ZeroArgSelector, ", (clang::IdentifierInfo*)($e.Ptr & ~$e.PtrMask))
- ) #elif (($e.Ptr & $e.PtrMask) == $e.StoredObjCOneArgSelector) (
- #("OneArgSelector, ", (clang::IdentifierInfo*)($e.Ptr & ~$e.PtrMask))
- ) #elif (($e.Ptr & $e.PtrMask) == $e.StoredDeclarationNameExtra) (
- #switch (((clang::DeclarationNameExtra*)($e.Ptr & ~$e.PtrMask)).ExtraKindOrNumArgs)
- #case 0 ( ;DeclarationNameExtra::CXXConstructor
- #("CXXConstructorName, ", (clang::CXXSpecialName*)($e.Ptr & ~$e.PtrMask))
- )
- #case 1 ( ;DeclarationNameExtra::CXXDestructor
- #("CXXDestructorName, ", (clang::CXXSpecialName*)($e.Ptr & ~$e.PtrMask))
- )
- #case 2 ( ;DeclarationNameExtra::CXXConversionFunction
- #("CXXConversionFunctionName, ", (clang::CXXSpecialName*)($e.Ptr & ~$e.PtrMask))
- )
- #case 46 ( ;DeclarationNameExtra::CXXLiteralOperator
- #("CXXLiteralOperatorName, ", (clang::CXXLiteralOperatorIdName*)($e.Ptr & ~$e.PtrMask))
- )
- #case 47 ( ;DeclarationNameExtra::CXXUsingDirective
- #("CXXUsingDirective") ;TODO What to add here?
- )
- #default (
- #if (((clang::DeclarationNameExtra*)($e.Ptr & ~$e.PtrMask)).ExtraKindOrNumArgs < 47) (
- #("CXXOperatorName, ", (clang::CXXOperatorIdName*)($e.Ptr & ~$e.PtrMask))
- ) #else (
- #("ObjCMultiArgSelector, ", (clang::MultiKeywordSelector*)($e.Ptr & ~$e.PtrMask))
- )
- )
- )
- )
-
- children (
- #(
- ; enum values from clang::DeclarationName::StoredNameKind
- #if ($e.Ptr == 0) (
- #array( expr: 0, size: 0 )
- ) #else (
- #(
- #([raw members] : [$e.Ptr,!]),
- if (($e.Ptr & $e.PtrMask) == $e.StoredIdentifier) (
- #(Ptr : (clang::IdentifierInfo*)($e.Ptr & ~$e.PtrMask))
- ) #elif (($e.Ptr & $e.PtrMask) == $e.StoredObjCZeroArgSelector) (
- #(Ptr : (clang::IdentifierInfo*)($e.Ptr & ~$e.PtrMask))
- ) #elif (($e.Ptr & $e.PtrMask) == $e.StoredObjCOneArgSelector) (
- #(Ptr : (clang::IdentifierInfo*)($e.Ptr & ~$e.PtrMask))
- ) #elif (($e.Ptr & $e.PtrMask) == $e.StoredDeclarationNameExtra) (
- #switch (((clang::DeclarationNameExtra*)($e.Ptr & ~$e.PtrMask)).ExtraKindOrNumArgs)
- #case 0 ( ;DeclarationNameExtra::CXXConstructor
- #(Ptr : (clang::CXXSpecialName*)($e.Ptr & ~$e.PtrMask))
- )
- #case 1 ( ;DeclarationNameExtra::CXXDestructor
- #(Ptr : (clang::CXXSpecialName*)($e.Ptr & ~$e.PtrMask))
- )
- #case 2 ( ;DeclarationNameExtra::CXXConversionFunction
- #(Ptr : (clang::CXXSpecialName*)($e.Ptr & ~$e.PtrMask))
- )
- #case 46 ( ;DeclarationNameExtra::CXXLiteralOperator
- #(Ptr : (clang::CXXLiteralOperatorIdName*)($e.Ptr & ~$e.PtrMask))
- )
- #case 47 ( ;DeclarationNameExtra::CXXUsingDirective
- #(Ptr : $e.Ptr) ;TODO What to add here?
- )
- #default (
- #if (((clang::DeclarationNameExtra*)($e.Ptr & ~$e.PtrMask)).ExtraKindOrNumArgs < 47) (
- #(Ptr : (CXXOperatorIdName*)($e.Ptr & ~$e.PtrMask))
- ) #else (
- #(Ptr : (clang::MultiKeywordSelector*)($e.Ptr & ~$e.PtrMask))
- )
- )
- )
- )
- )
- )
- )
-}
-
-clang::DeclSpec{
- preview (
- #(
- "[",
- (clang::DeclSpec::SCS)$e.StorageClassSpec,
- ", ",
- (clang::TypeSpecifierType)$e.TypeSpecType,
- "]"
- )
- )
-}
-
-llvm::Triple{
- preview ( $e.Data )
-}
More information about the cfe-commits
mailing list