[Lldb-commits] [lldb] r121158 - in /lldb/trunk: include/lldb/Core/ValueObjectChild.h source/Core/ValueObjectChild.cpp

Greg Clayton gclayton at apple.com
Tue Dec 7 10:26:09 PST 2010


Author: gclayton
Date: Tue Dec  7 12:26:09 2010
New Revision: 121158

URL: http://llvm.org/viewvc/llvm-project?rev=121158&view=rev
Log:
Cleanup before making the objective C ivar changes.


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

Modified: lldb/trunk/include/lldb/Core/ValueObjectChild.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectChild.h?rev=121158&r1=121157&r2=121158&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectChild.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectChild.h Tue Dec  7 12:26:09 2010
@@ -38,22 +38,40 @@
     virtual ~ValueObjectChild();
 
     virtual size_t
-    GetByteSize();
+    GetByteSize()
+    {
+        return m_byte_size;
+    }
 
     virtual off_t
-    GetByteOffset();
+    GetByteOffset()
+    {
+        return m_byte_offset;
+    }
 
     virtual uint32_t
-    GetBitfieldBitSize();
+    GetBitfieldBitSize()
+    {
+        return m_bitfield_bit_size;
+    }
 
     virtual uint32_t
-    GetBitfieldBitOffset();
+    GetBitfieldBitOffset()
+    {
+        return m_bitfield_bit_offset;
+    }
 
     virtual clang::ASTContext *
-    GetClangAST ();
+    GetClangAST ()
+    {
+        return m_clang_ast;
+    }
 
     virtual void *
-    GetClangType ();
+    GetClangType ()
+    {
+        return m_clang_type;
+    }
 
     virtual lldb::ValueType
     GetValueType() const;
@@ -82,12 +100,10 @@
     ConstString m_type_name;
     uint32_t m_byte_size;
     int32_t m_byte_offset;
-    uint32_t m_bitfield_bit_size;
-    uint32_t m_bitfield_bit_offset;
+    uint8_t m_bitfield_bit_size;
+    uint8_t m_bitfield_bit_offset;
     bool m_is_base_class;
 
-    uint32_t
-    GetByteOffset() const;
 //
 //  void
 //  ReadValueFromMemory (ValueObject* parent, lldb::addr_t address);

Modified: lldb/trunk/source/Core/ValueObjectChild.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectChild.cpp?rev=121158&r1=121157&r2=121158&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectChild.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectChild.cpp Tue Dec  7 12:26:09 2010
@@ -45,8 +45,9 @@
     m_bitfield_bit_offset (bitfield_bit_offset),
     m_is_base_class (is_base_class)
 {
+    assert (bitfield_bit_size   < (sizeof(m_bitfield_bit_size  ) * CHAR_BIT));
+    assert (bitfield_bit_offset < (sizeof(m_bitfield_bit_offset) * CHAR_BIT));
     assert(byte_size != 0 && "TEMPORARY DEBUGGING ASSERT");
-    
     m_name = name;
 }
 
@@ -54,12 +55,6 @@
 {
 }
 
-void *
-ValueObjectChild::GetClangType()
-{
-    return m_clang_type;
-}
-
 lldb::ValueType
 ValueObjectChild::GetValueType() const
 {
@@ -72,36 +67,6 @@
     return ClangASTContext::GetNumChildren (m_clang_type, true);
 }
 
-clang::ASTContext *
-ValueObjectChild::GetClangAST ()
-{
-    return m_clang_ast;
-}
-
-size_t
-ValueObjectChild::GetByteSize()
-{
-    return m_byte_size;
-}
-
-off_t
-ValueObjectChild::GetByteOffset()
-{
-    return m_byte_offset;
-}
-
-uint32_t
-ValueObjectChild::GetBitfieldBitSize()
-{
-    return m_bitfield_bit_size;
-}
-
-uint32_t
-ValueObjectChild::GetBitfieldBitOffset()
-{
-    return m_bitfield_bit_offset;
-}
-
 ConstString
 ValueObjectChild::GetTypeName()
 {





More information about the lldb-commits mailing list