[Lldb-commits] [lldb] r216487 - It was pointed out to me that an offset of 0 makes sense for ObjC, but not always for C++, and this API claims to be general enough that it should not drop C++ usability on the floor for no good reason. Fix it with an explicit offset argument

Enrico Granata egranata at apple.com
Tue Aug 26 14:35:31 PDT 2014


Author: enrico
Date: Tue Aug 26 16:35:30 2014
New Revision: 216487

URL: http://llvm.org/viewvc/llvm-project?rev=216487&view=rev
Log:
It was pointed out to me that an offset of 0 makes sense for ObjC, but not always for C++, and this API claims to be general enough that it should not drop C++ usability on the floor for no good reason. Fix it with an explicit offset argument

Modified:
    lldb/trunk/include/lldb/Core/ValueObject.h
    lldb/trunk/source/Core/ValueObject.cpp

Modified: lldb/trunk/include/lldb/Core/ValueObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObject.h?rev=216487&r1=216486&r2=216487&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObject.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObject.h Tue Aug 26 16:35:30 2014
@@ -677,8 +677,8 @@ public:
     GetSyntheticChildAtOffset(uint32_t offset, const ClangASTType& type, bool can_create);
     
     virtual lldb::ValueObjectSP
-    GetSyntheticBase (const ClangASTType& type, bool can_create);
-    
+    GetSyntheticBase (uint32_t offset, const ClangASTType& type, bool can_create);
+
     virtual lldb::ValueObjectSP
     GetDynamicValue (lldb::DynamicValueType valueType);
     

Modified: lldb/trunk/source/Core/ValueObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObject.cpp?rev=216487&r1=216486&r2=216487&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObject.cpp (original)
+++ lldb/trunk/source/Core/ValueObject.cpp Tue Aug 26 16:35:30 2014
@@ -2216,7 +2216,7 @@ ValueObject::GetSyntheticChildAtOffset(u
 }
 
 ValueObjectSP
-ValueObject::GetSyntheticBase (const ClangASTType& type, bool can_create)
+ValueObject::GetSyntheticBase (uint32_t offset, const ClangASTType& type, bool can_create)
 {
     ValueObjectSP synthetic_child_sp;
     
@@ -2234,7 +2234,6 @@ ValueObject::GetSyntheticBase (const Cla
     if (!can_create)
         return ValueObjectSP();
     
-    const uint32_t offset = 0;
     const bool is_base_class = true;
     
     ValueObjectChild *synthetic_child = new ValueObjectChild(*this,





More information about the lldb-commits mailing list