[Lldb-commits] [lldb] r172671 - /lldb/trunk/source/Core/FormatManager.cpp

Enrico Granata egranata at apple.com
Wed Jan 16 15:17:30 PST 2013


Author: enrico
Date: Wed Jan 16 17:17:30 2013
New Revision: 172671

URL: http://llvm.org/viewvc/llvm-project?rev=172671&view=rev
Log:
Adding a custom summary for libc++ std::vector<bool>
vector<bool> is specialized and the existing general summary for vectors would lie to the user.
Tackling libstdc++ and synthetic children is the following, less critical, part of this task


Modified:
    lldb/trunk/source/Core/FormatManager.cpp

Modified: lldb/trunk/source/Core/FormatManager.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/FormatManager.cpp?rev=172671&r1=172670&r2=172671&view=diff
==============================================================================
--- lldb/trunk/source/Core/FormatManager.cpp (original)
+++ lldb/trunk/source/Core/FormatManager.cpp Wed Jan 16 17:17:30 2013
@@ -910,6 +910,10 @@
                                                         TypeSummaryImplSP(new StringSummaryFormat(stl_summary_flags, "{${var.__ptr_%S}} (strong=${var.count} weak=${var.weak_count})")));
     libcxx_category_sp->GetRegexSummaryNavigator()->Add(RegularExpressionSP(new RegularExpression("^std::__1::weak_ptr<.+>(( )?&)?$")),
                                                         TypeSummaryImplSP(new StringSummaryFormat(stl_summary_flags, "{${var.__ptr_%S}} (strong=${var.count} weak=${var.weak_count})")));
+    
+    // this summary prevails on the regex std::vector<> because we do exact matches before regex ones
+    libcxx_category_sp->GetSummaryNavigator()->Add(ConstString("std::__1::vector<std::__1::allocator<bool> >"),
+                                                   TypeSummaryImplSP(new StringSummaryFormat(stl_summary_flags, "size=${var.__size_}")));
 
 #endif
 }





More information about the lldb-commits mailing list