[llvm] r346252 - [utils] Update SmallVector lldb formatter for r337514
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 6 10:52:30 PST 2018
Author: bogner
Date: Tue Nov 6 10:52:30 2018
New Revision: 346252
URL: http://llvm.org/viewvc/llvm-project?rev=346252&view=rev
Log:
[utils] Update SmallVector lldb formatter for r337514
SmallVector was changed to store a begin and a size rather than a
begin and an end a while back. Update the formatter to look at the
correct members.
Modified:
llvm/trunk/utils/lldbDataFormatters.py
Modified: llvm/trunk/utils/lldbDataFormatters.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lldbDataFormatters.py?rev=346252&r1=346251&r2=346252&view=diff
==============================================================================
--- llvm/trunk/utils/lldbDataFormatters.py (original)
+++ llvm/trunk/utils/lldbDataFormatters.py Tue Nov 6 10:52:30 2018
@@ -26,9 +26,7 @@ class SmallVectorSynthProvider:
self.update() # initialize this provider
def num_children(self):
- begin = self.begin.GetValueAsUnsigned(0)
- end = self.end.GetValueAsUnsigned(0)
- return (end - begin)/self.type_size
+ return self.size.GetValueAsUnsigned(0)
def get_child_index(self, name):
try:
@@ -49,7 +47,7 @@ class SmallVectorSynthProvider:
def update(self):
self.begin = self.valobj.GetChildMemberWithName('BeginX')
- self.end = self.valobj.GetChildMemberWithName('EndX')
+ self.size = self.valobj.GetChildMemberWithName('Size')
the_type = self.valobj.GetType()
# If this is a reference type we have to dereference it to get to the
# template parameter.
More information about the llvm-commits
mailing list