[Lldb-commits] [lldb] r224160 - Some more cleanup of the ValueObjectConstResultImpl code. NFC.

Enrico Granata egranata at apple.com
Fri Dec 12 14:37:44 PST 2014


Author: enrico
Date: Fri Dec 12 16:37:44 2014
New Revision: 224160

URL: http://llvm.org/viewvc/llvm-project?rev=224160&view=rev
Log:
Some more cleanup of the ValueObjectConstResultImpl code. NFC.

Modified:
    lldb/trunk/include/lldb/Core/ValueObjectChild.h
    lldb/trunk/include/lldb/Core/ValueObjectConstResultImpl.h
    lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp
    lldb/trunk/test/expression_command/formatters/TestFormatters.py

Modified: lldb/trunk/include/lldb/Core/ValueObjectChild.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectChild.h?rev=224160&r1=224159&r2=224160&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectChild.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectChild.h Fri Dec 12 16:37:44 2014
@@ -106,6 +106,7 @@ protected:
 protected:
     friend class ValueObject;
     friend class ValueObjectConstResult;
+    friend class ValueObjectConstResultImpl;
     ValueObjectChild (ValueObject &parent,
                       const ClangASTType &clang_type,
                       const ConstString &name,

Modified: lldb/trunk/include/lldb/Core/ValueObjectConstResultImpl.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectConstResultImpl.h?rev=224160&r1=224159&r2=224160&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectConstResultImpl.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectConstResultImpl.h Fri Dec 12 16:37:44 2014
@@ -47,13 +47,6 @@ public:
     lldb::ValueObjectSP
     AddressOf (Error &error);
     
-    bool
-    NeedsDerefOnTarget()
-    {
-        m_impl_backend->UpdateValueIfNeeded(false);
-        return (m_impl_backend->GetValue().GetValueType() == Value::eValueTypeHostAddress);
-    }
-    
     lldb::addr_t
     GetLiveAddress()
     {
@@ -68,9 +61,6 @@ public:
         m_live_address_type = address_type;
     }
     
-    lldb::ValueObjectSP
-    DerefOnTarget();
-    
     virtual lldb::addr_t
     GetAddressOf (bool scalar_is_load_address = true,
                   AddressType *address_type = NULL);

Modified: lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp?rev=224160&r1=224159&r2=224160&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectConstResultImpl.cpp Fri Dec 12 16:37:44 2014
@@ -41,23 +41,6 @@ ValueObjectConstResultImpl::ValueObjectC
 }
 
 lldb::ValueObjectSP
-ValueObjectConstResultImpl::DerefOnTarget()
-{
-    if (m_load_addr_backend.get() == NULL)
-    {
-        lldb::addr_t tgt_address = m_impl_backend->GetPointerValue();
-        ExecutionContext exe_ctx (m_impl_backend->GetExecutionContextRef());
-        m_load_addr_backend = ValueObjectConstResult::Create (exe_ctx.GetBestExecutionContextScope(),
-                                                              m_impl_backend->GetClangType(),
-                                                              m_impl_backend->GetName(),
-                                                              tgt_address,
-                                                              eAddressTypeLoad,
-                                                              exe_ctx.GetAddressByteSize());
-    }
-    return m_load_addr_backend;
-}
-
-lldb::ValueObjectSP
 ValueObjectConstResultImpl::Dereference (Error &error)
 {
     if (m_impl_backend == NULL)

Modified: lldb/trunk/test/expression_command/formatters/TestFormatters.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/formatters/TestFormatters.py?rev=224160&r1=224159&r2=224160&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/formatters/TestFormatters.py (original)
+++ lldb/trunk/test/expression_command/formatters/TestFormatters.py Fri Dec 12 16:37:44 2014
@@ -128,7 +128,7 @@ class ExprFormattersTestCase(TestBase):
         self.runCmd("type summary add -F formatters.foo_SummaryProvider foo")
 
         self.expect("expression $" + object_name,
-                    substrs = ['(foo) $', 'a = 121','a_ptr = ', ' -> 122','i = 242', 'i_ptr = ', ' -> 8888', 'h = 245','k = 247'])
+                    substrs = ['(foo) $', 'a = 121','a_ptr = ', ' -> 122','i = 242', 'i_ptr = ', ' -> 8888','k = 247'])
 
         process = self.dbg.GetSelectedTarget().GetProcess()
         thread = process.GetThreadAtIndex(0)





More information about the lldb-commits mailing list