[Lldb-commits] [lldb] r220322 - Expose the type-info flags at the public API layer. These flags provide much more informational content to consumers of the LLDB API than the existing TypeClass. Part of the fix for rdar://18517593

Enrico Granata egranata at apple.com
Tue Oct 21 13:52:14 PDT 2014


Author: enrico
Date: Tue Oct 21 15:52:14 2014
New Revision: 220322

URL: http://llvm.org/viewvc/llvm-project?rev=220322&view=rev
Log:
Expose the type-info flags at the public API layer. These flags provide much more informational content to consumers of the LLDB API than the existing TypeClass. Part of the fix for rdar://18517593

Modified:
    lldb/trunk/include/lldb/API/SBType.h
    lldb/trunk/include/lldb/Symbol/ClangASTType.h
    lldb/trunk/include/lldb/lldb-enumerations.h
    lldb/trunk/scripts/Python/interface/SBType.i
    lldb/trunk/source/API/SBType.cpp
    lldb/trunk/source/Core/Debugger.cpp
    lldb/trunk/source/Core/ValueObject.cpp
    lldb/trunk/source/Core/ValueObjectChild.cpp
    lldb/trunk/source/DataFormatters/CXXFormatterFunctions.cpp
    lldb/trunk/source/DataFormatters/NSArray.cpp
    lldb/trunk/source/DataFormatters/TypeFormat.cpp
    lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp
    lldb/trunk/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp
    lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp
    lldb/trunk/source/Target/StackFrame.cpp

Modified: lldb/trunk/include/lldb/API/SBType.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBType.h?rev=220322&r1=220321&r2=220322&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBType.h (original)
+++ lldb/trunk/include/lldb/API/SBType.h Tue Oct 21 15:52:14 2014
@@ -231,6 +231,9 @@ public:
     
     bool
     IsTypeComplete ();
+    
+    uint32_t
+    GetTypeFlags ();
 
     bool
     GetDescription (lldb::SBStream &description, 

Modified: lldb/trunk/include/lldb/Symbol/ClangASTType.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangASTType.h?rev=220322&r1=220321&r2=220322&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/ClangASTType.h (original)
+++ lldb/trunk/include/lldb/Symbol/ClangASTType.h Tue Oct 21 15:52:14 2014
@@ -30,32 +30,6 @@ namespace lldb_private {
 class ClangASTType
 {
 public:
-    enum {
-        eTypeHasChildren        = (1u <<  0),
-        eTypeHasValue           = (1u <<  1),
-        eTypeIsArray            = (1u <<  2),
-        eTypeIsBlock            = (1u <<  3),
-        eTypeIsBuiltIn          = (1u <<  4),
-        eTypeIsClass            = (1u <<  5),
-        eTypeIsCPlusPlus        = (1u <<  6),
-        eTypeIsEnumeration      = (1u <<  7),
-        eTypeIsFuncPrototype    = (1u <<  8),
-        eTypeIsMember           = (1u <<  9),
-        eTypeIsObjC             = (1u << 10),
-        eTypeIsPointer          = (1u << 11),
-        eTypeIsReference        = (1u << 12),
-        eTypeIsStructUnion      = (1u << 13),
-        eTypeIsTemplate         = (1u << 14),
-        eTypeIsTypedef          = (1u << 15),
-        eTypeIsVector           = (1u << 16),
-        eTypeIsScalar           = (1u << 17),
-        eTypeIsInteger          = (1u << 18),
-        eTypeIsFloat            = (1u << 19),
-        eTypeIsComplex          = (1u << 20),
-        eTypeIsSigned           = (1u << 21)
-    };
-    
-
     //----------------------------------------------------------------------
     // Constructors and Destructors
     //----------------------------------------------------------------------

Modified: lldb/trunk/include/lldb/lldb-enumerations.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-enumerations.h?rev=220322&r1=220321&r2=220322&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-enumerations.h (original)
+++ lldb/trunk/include/lldb/lldb-enumerations.h Tue Oct 21 15:52:14 2014
@@ -879,6 +879,34 @@ namespace lldb {
         eMatchTypeRegex,
         eMatchTypeStartsWith
     } MatchType;
+    
+    //----------------------------------------------------------------------
+    // Bitmask that describes details about a type
+    //----------------------------------------------------------------------
+    typedef enum TypeFlags {
+        eTypeHasChildren        = (1u <<  0),
+        eTypeHasValue           = (1u <<  1),
+        eTypeIsArray            = (1u <<  2),
+        eTypeIsBlock            = (1u <<  3),
+        eTypeIsBuiltIn          = (1u <<  4),
+        eTypeIsClass            = (1u <<  5),
+        eTypeIsCPlusPlus        = (1u <<  6),
+        eTypeIsEnumeration      = (1u <<  7),
+        eTypeIsFuncPrototype    = (1u <<  8),
+        eTypeIsMember           = (1u <<  9),
+        eTypeIsObjC             = (1u << 10),
+        eTypeIsPointer          = (1u << 11),
+        eTypeIsReference        = (1u << 12),
+        eTypeIsStructUnion      = (1u << 13),
+        eTypeIsTemplate         = (1u << 14),
+        eTypeIsTypedef          = (1u << 15),
+        eTypeIsVector           = (1u << 16),
+        eTypeIsScalar           = (1u << 17),
+        eTypeIsInteger          = (1u << 18),
+        eTypeIsFloat            = (1u << 19),
+        eTypeIsComplex          = (1u << 20),
+        eTypeIsSigned           = (1u << 21)
+    } TypeFlags;
 
 } // namespace lldb
 

Modified: lldb/trunk/scripts/Python/interface/SBType.i
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/interface/SBType.i?rev=220322&r1=220321&r2=220322&view=diff
==============================================================================
--- lldb/trunk/scripts/Python/interface/SBType.i (original)
+++ lldb/trunk/scripts/Python/interface/SBType.i Tue Oct 21 15:52:14 2014
@@ -286,6 +286,9 @@ public:
 
     bool
     IsTypeComplete ();
+    
+    uint32_t
+    GetTypeFlags ();
 
     %pythoncode %{
         def template_arg_array(self):

Modified: lldb/trunk/source/API/SBType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBType.cpp?rev=220322&r1=220321&r2=220322&view=diff
==============================================================================
--- lldb/trunk/source/API/SBType.cpp (original)
+++ lldb/trunk/source/API/SBType.cpp Tue Oct 21 15:52:14 2014
@@ -449,6 +449,14 @@ SBType::IsTypeComplete()
     return m_opaque_sp->GetClangASTType(false).IsCompleteType();
 }
 
+uint32_t
+SBType::GetTypeFlags ()
+{
+    if (!IsValid())
+        return 0;
+    return m_opaque_sp->GetClangASTType(true).GetTypeInfo();
+}
+
 const char*
 SBType::GetName()
 {

Modified: lldb/trunk/source/Core/Debugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Debugger.cpp?rev=220322&r1=220321&r2=220322&view=diff
==============================================================================
--- lldb/trunk/source/Core/Debugger.cpp (original)
+++ lldb/trunk/source/Core/Debugger.cpp Tue Oct 21 15:52:14 2014
@@ -1850,8 +1850,8 @@ FormatPromptRecurse
                                 
                                 // TODO use flags for these
                                 const uint32_t type_info_flags = target->GetClangType().GetTypeInfo(NULL);
-                                bool is_array = (type_info_flags & ClangASTType::eTypeIsArray) != 0;
-                                bool is_pointer = (type_info_flags & ClangASTType::eTypeIsPointer) != 0;
+                                bool is_array = (type_info_flags & eTypeIsArray) != 0;
+                                bool is_pointer = (type_info_flags & eTypeIsPointer) != 0;
                                 bool is_aggregate = target->GetClangType().IsAggregateType();
                                 
                                 if ((is_array || is_pointer) && (!is_array_range) && val_obj_display == ValueObject::eValueObjectRepresentationStyleValue) // this should be wrong, but there are some exceptions

Modified: lldb/trunk/source/Core/ValueObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObject.cpp?rev=220322&r1=220321&r2=220322&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObject.cpp (original)
+++ lldb/trunk/source/Core/ValueObject.cpp Tue Oct 21 15:52:14 2014
@@ -751,9 +751,9 @@ ValueObject::MightHaveChildren()
     const uint32_t type_info = GetTypeInfo();
     if (type_info)
     {
-        if (type_info & (ClangASTType::eTypeHasChildren |
-                         ClangASTType::eTypeIsPointer |
-                         ClangASTType::eTypeIsReference))
+        if (type_info & (eTypeHasChildren |
+                         eTypeIsPointer |
+                         eTypeIsReference))
             has_children = true;
     }
     else
@@ -939,13 +939,13 @@ ValueObject::IsCStringContainer(bool che
 {
     ClangASTType pointee_or_element_clang_type;
     const Flags type_flags (GetTypeInfo (&pointee_or_element_clang_type));
-    bool is_char_arr_ptr (type_flags.AnySet (ClangASTType::eTypeIsArray | ClangASTType::eTypeIsPointer) &&
+    bool is_char_arr_ptr (type_flags.AnySet (eTypeIsArray | eTypeIsPointer) &&
                           pointee_or_element_clang_type.IsCharType ());
     if (!is_char_arr_ptr)
         return false;
     if (!check_pointer)
         return true;
-    if (type_flags.Test(ClangASTType::eTypeIsArray))
+    if (type_flags.Test(eTypeIsArray))
         return true;
     addr_t cstr_address = LLDB_INVALID_ADDRESS;
     AddressType cstr_address_type = eAddressTypeInvalid;
@@ -960,8 +960,8 @@ ValueObject::GetPointeeData (DataExtract
 {
     ClangASTType pointee_or_element_clang_type;
     const uint32_t type_info = GetTypeInfo (&pointee_or_element_clang_type);
-    const bool is_pointer_type = type_info & ClangASTType::eTypeIsPointer;
-    const bool is_array_type = type_info & ClangASTType::eTypeIsArray;
+    const bool is_pointer_type = type_info & eTypeIsPointer;
+    const bool is_array_type = type_info & eTypeIsArray;
     if (!(is_pointer_type || is_array_type))
         return 0;
     
@@ -1213,7 +1213,7 @@ ValueObject::ReadPointedString (Stream&
     ClangASTType clang_type = GetClangType();
     ClangASTType elem_or_pointee_clang_type;
     const Flags type_flags (GetTypeInfo (&elem_or_pointee_clang_type));
-    if (type_flags.AnySet (ClangASTType::eTypeIsArray | ClangASTType::eTypeIsPointer) &&
+    if (type_flags.AnySet (eTypeIsArray | eTypeIsPointer) &&
         elem_or_pointee_clang_type.IsCharType ())
     {
         addr_t cstr_address = LLDB_INVALID_ADDRESS;
@@ -1221,7 +1221,7 @@ ValueObject::ReadPointedString (Stream&
         
         size_t cstr_len = 0;
         bool capped_data = false;
-        if (type_flags.Test (ClangASTType::eTypeIsArray))
+        if (type_flags.Test (eTypeIsArray))
         {
             // We have an array
             uint64_t array_size = 0;
@@ -1528,7 +1528,7 @@ ValueObject::HasSpecialPrintableRepresen
                                                Format custom_format)
 {
     Flags flags(GetTypeInfo());
-    if (flags.AnySet(ClangASTType::eTypeIsArray | ClangASTType::eTypeIsPointer)
+    if (flags.AnySet(eTypeIsArray | eTypeIsPointer)
         && val_obj_display == ValueObject::eValueObjectRepresentationStyleValue)
     {        
         if (IsCStringContainer(true) && 
@@ -1538,7 +1538,7 @@ ValueObject::HasSpecialPrintableRepresen
              custom_format == eFormatVectorOfChar))
             return true;
 
-        if (flags.Test(ClangASTType::eTypeIsArray))
+        if (flags.Test(eTypeIsArray))
         {
             if ((custom_format == eFormatBytes) ||
                 (custom_format == eFormatBytesWithASCII))
@@ -1577,7 +1577,7 @@ ValueObject::DumpPrintableRepresentation
     
     if (allow_special)
     {
-        if (flags.AnySet(ClangASTType::eTypeIsArray | ClangASTType::eTypeIsPointer)
+        if (flags.AnySet(eTypeIsArray | eTypeIsPointer)
              && val_obj_display == ValueObject::eValueObjectRepresentationStyleValue)
         {
             // when being asked to get a printable display an array or pointer type directly, 
@@ -1603,7 +1603,7 @@ ValueObject::DumpPrintableRepresentation
             
             // this only works for arrays, because I have no way to know when
             // the pointed memory ends, and no special \0 end of data marker
-            if (flags.Test(ClangASTType::eTypeIsArray))
+            if (flags.Test(eTypeIsArray))
             {
                 if ((custom_format == eFormatBytes) ||
                     (custom_format == eFormatBytesWithASCII))
@@ -2059,7 +2059,7 @@ ValueObject::IsPossibleDynamicType ()
 bool
 ValueObject::IsObjCNil ()
 {
-    const uint32_t mask = ClangASTType::eTypeIsObjC | ClangASTType::eTypeIsPointer;
+    const uint32_t mask = eTypeIsObjC | eTypeIsPointer;
     bool isObjCpointer = (((GetClangType().GetTypeInfo(NULL)) & mask) == mask);
     if (!isObjCpointer)
         return false;
@@ -2072,10 +2072,10 @@ ValueObjectSP
 ValueObject::GetSyntheticArrayMember (size_t index, bool can_create)
 {
     const uint32_t type_info = GetTypeInfo ();
-    if (type_info & ClangASTType::eTypeIsArray)
+    if (type_info & eTypeIsArray)
         return GetSyntheticArrayMemberFromArray(index, can_create);
 
-    if (type_info & ClangASTType::eTypeIsPointer)
+    if (type_info & eTypeIsPointer)
         return GetSyntheticArrayMemberFromPointer(index, can_create);
     
     return ValueObjectSP();
@@ -2521,12 +2521,12 @@ ValueObject::GetExpressionPath (Stream &
                     {                    
                         const uint32_t non_base_class_parent_type_info = non_base_class_parent_clang_type.GetTypeInfo();
                         
-                        if (non_base_class_parent_type_info & ClangASTType::eTypeIsPointer)
+                        if (non_base_class_parent_type_info & eTypeIsPointer)
                         {
                             s.PutCString("->");
                         }
-                        else if ((non_base_class_parent_type_info & ClangASTType::eTypeHasChildren) &&
-                                 !(non_base_class_parent_type_info & ClangASTType::eTypeIsArray))
+                        else if ((non_base_class_parent_type_info & eTypeHasChildren) &&
+                                 !(non_base_class_parent_type_info & eTypeIsArray))
                         {
                             s.PutChar('.');
                         }
@@ -2750,15 +2750,15 @@ ValueObject::GetValueForExpressionPath_I
             case '-':
             {
                 if (options.m_check_dot_vs_arrow_syntax &&
-                    root_clang_type_info.Test(ClangASTType::eTypeIsPointer) ) // if you are trying to use -> on a non-pointer and I must catch the error
+                    root_clang_type_info.Test(eTypeIsPointer) ) // if you are trying to use -> on a non-pointer and I must catch the error
                 {
                     *first_unparsed = expression_cstr;
                     *reason_to_stop = ValueObject::eExpressionPathScanEndReasonArrowInsteadOfDot;
                     *final_result = ValueObject::eExpressionPathEndResultTypeInvalid;
                     return ValueObjectSP();
                 }
-                if (root_clang_type_info.Test(ClangASTType::eTypeIsObjC) &&  // if yo are trying to extract an ObjC IVar when this is forbidden
-                    root_clang_type_info.Test(ClangASTType::eTypeIsPointer) &&
+                if (root_clang_type_info.Test(eTypeIsObjC) &&  // if yo are trying to extract an ObjC IVar when this is forbidden
+                    root_clang_type_info.Test(eTypeIsPointer) &&
                     options.m_no_fragile_ivar)
                 {
                     *first_unparsed = expression_cstr;
@@ -2778,7 +2778,7 @@ ValueObject::GetValueForExpressionPath_I
             case '.': // or fallthrough from ->
             {
                 if (options.m_check_dot_vs_arrow_syntax && *expression_cstr == '.' &&
-                    root_clang_type_info.Test(ClangASTType::eTypeIsPointer)) // if you are trying to use . on a pointer and I must catch the error
+                    root_clang_type_info.Test(eTypeIsPointer)) // if you are trying to use . on a pointer and I must catch the error
                 {
                     *first_unparsed = expression_cstr;
                     *reason_to_stop = ValueObject::eExpressionPathScanEndReasonDotInsteadOfArrow;
@@ -2879,9 +2879,9 @@ ValueObject::GetValueForExpressionPath_I
             }
             case '[':
             {
-                if (!root_clang_type_info.Test(ClangASTType::eTypeIsArray) && !root_clang_type_info.Test(ClangASTType::eTypeIsPointer) && !root_clang_type_info.Test(ClangASTType::eTypeIsVector)) // if this is not a T[] nor a T*
+                if (!root_clang_type_info.Test(eTypeIsArray) && !root_clang_type_info.Test(eTypeIsPointer) && !root_clang_type_info.Test(eTypeIsVector)) // if this is not a T[] nor a T*
                 {
-                    if (!root_clang_type_info.Test(ClangASTType::eTypeIsScalar)) // if this is not even a scalar...
+                    if (!root_clang_type_info.Test(eTypeIsScalar)) // if this is not even a scalar...
                     {
                         if (options.m_no_synthetic_children) // ...only chance left is synthetic
                         {
@@ -2901,7 +2901,7 @@ ValueObject::GetValueForExpressionPath_I
                 }
                 if (*(expression_cstr+1) == ']') // if this is an unbounded range it only works for arrays
                 {
-                    if (!root_clang_type_info.Test(ClangASTType::eTypeIsArray))
+                    if (!root_clang_type_info.Test(eTypeIsArray))
                     {
                         *first_unparsed = expression_cstr;
                         *reason_to_stop = ValueObject::eExpressionPathScanEndReasonEmptyRangeNotAllowed;
@@ -2938,7 +2938,7 @@ ValueObject::GetValueForExpressionPath_I
                     }
                     if (end - expression_cstr == 1) // if this is [], only return a valid value for arrays
                     {
-                        if (root_clang_type_info.Test(ClangASTType::eTypeIsArray))
+                        if (root_clang_type_info.Test(eTypeIsArray))
                         {
                             *first_unparsed = expression_cstr+2;
                             *reason_to_stop = ValueObject::eExpressionPathScanEndReasonArrayRangeOperatorMet;
@@ -2954,7 +2954,7 @@ ValueObject::GetValueForExpressionPath_I
                         }
                     }
                     // from here on we do have a valid index
-                    if (root_clang_type_info.Test(ClangASTType::eTypeIsArray))
+                    if (root_clang_type_info.Test(eTypeIsArray))
                     {
                         ValueObjectSP child_valobj_sp = root->GetChildAtIndex(index, true);
                         if (!child_valobj_sp)
@@ -2977,10 +2977,10 @@ ValueObject::GetValueForExpressionPath_I
                             return ValueObjectSP();
                         }
                     }
-                    else if (root_clang_type_info.Test(ClangASTType::eTypeIsPointer))
+                    else if (root_clang_type_info.Test(eTypeIsPointer))
                     {
                         if (*what_next == ValueObject::eExpressionPathAftermathDereference &&  // if this is a ptr-to-scalar, I am accessing it by index and I would have deref'ed anyway, then do it now and use this as a bitfield
-                            pointee_clang_type_info.Test(ClangASTType::eTypeIsScalar))
+                            pointee_clang_type_info.Test(eTypeIsScalar))
                         {
                             Error error;
                             root = root->Dereference(error);
@@ -3000,7 +3000,7 @@ ValueObject::GetValueForExpressionPath_I
                         else
                         {
                             if (root->GetClangType().GetMinimumLanguage() == eLanguageTypeObjC
-                                && pointee_clang_type_info.AllClear(ClangASTType::eTypeIsPointer)
+                                && pointee_clang_type_info.AllClear(eTypeIsPointer)
                                 && root->HasSyntheticValue()
                                 && options.m_no_synthetic_children == false)
                             {
@@ -3023,7 +3023,7 @@ ValueObject::GetValueForExpressionPath_I
                             }
                         }
                     }
-                    else if (root_clang_type_info.Test(ClangASTType::eTypeIsScalar))
+                    else if (root_clang_type_info.Test(eTypeIsScalar))
                     {
                         root = root->GetSyntheticBitFieldChild(index, index, true);
                         if (!root.get())
@@ -3041,7 +3041,7 @@ ValueObject::GetValueForExpressionPath_I
                             return root;
                         }
                     }
-                    else if (root_clang_type_info.Test(ClangASTType::eTypeIsVector))
+                    else if (root_clang_type_info.Test(eTypeIsVector))
                     {
                         root = root->GetChildAtIndex(index, true);
                         if (!root.get())
@@ -3126,7 +3126,7 @@ ValueObject::GetValueForExpressionPath_I
                         index_lower = index_higher;
                         index_higher = temp;
                     }
-                    if (root_clang_type_info.Test(ClangASTType::eTypeIsScalar)) // expansion only works for scalars
+                    if (root_clang_type_info.Test(eTypeIsScalar)) // expansion only works for scalars
                     {
                         root = root->GetSyntheticBitFieldChild(index_lower, index_higher, true);
                         if (!root.get())
@@ -3144,9 +3144,9 @@ ValueObject::GetValueForExpressionPath_I
                             return root;
                         }
                     }
-                    else if (root_clang_type_info.Test(ClangASTType::eTypeIsPointer) && // if this is a ptr-to-scalar, I am accessing it by index and I would have deref'ed anyway, then do it now and use this as a bitfield
+                    else if (root_clang_type_info.Test(eTypeIsPointer) && // if this is a ptr-to-scalar, I am accessing it by index and I would have deref'ed anyway, then do it now and use this as a bitfield
                              *what_next == ValueObject::eExpressionPathAftermathDereference &&
-                             pointee_clang_type_info.Test(ClangASTType::eTypeIsScalar))
+                             pointee_clang_type_info.Test(eTypeIsScalar))
                     {
                         Error error;
                         root = root->Dereference(error);
@@ -3223,9 +3223,9 @@ ValueObject::ExpandArraySliceExpression(
         {
             case '[':
             {
-                if (!root_clang_type_info.Test(ClangASTType::eTypeIsArray) && !root_clang_type_info.Test(ClangASTType::eTypeIsPointer)) // if this is not a T[] nor a T*
+                if (!root_clang_type_info.Test(eTypeIsArray) && !root_clang_type_info.Test(eTypeIsPointer)) // if this is not a T[] nor a T*
                 {
-                    if (!root_clang_type_info.Test(ClangASTType::eTypeIsScalar)) // if this is not even a scalar, this syntax is just plain wrong!
+                    if (!root_clang_type_info.Test(eTypeIsScalar)) // if this is not even a scalar, this syntax is just plain wrong!
                     {
                         *first_unparsed = expression_cstr;
                         *reason_to_stop = ValueObject::eExpressionPathScanEndReasonRangeOperatorInvalid;
@@ -3242,7 +3242,7 @@ ValueObject::ExpandArraySliceExpression(
                 }
                 if (*(expression_cstr+1) == ']') // if this is an unbounded range it only works for arrays
                 {
-                    if (!root_clang_type_info.Test(ClangASTType::eTypeIsArray))
+                    if (!root_clang_type_info.Test(eTypeIsArray))
                     {
                         *first_unparsed = expression_cstr;
                         *reason_to_stop = ValueObject::eExpressionPathScanEndReasonEmptyRangeNotAllowed;
@@ -3286,7 +3286,7 @@ ValueObject::ExpandArraySliceExpression(
                     }
                     if (end - expression_cstr == 1) // if this is [], only return a valid value for arrays
                     {
-                        if (root_clang_type_info.Test(ClangASTType::eTypeIsArray))
+                        if (root_clang_type_info.Test(eTypeIsArray))
                         {
                             const size_t max_index = root->GetNumChildren() - 1;
                             for (size_t index = 0; index < max_index; index++)
@@ -3309,7 +3309,7 @@ ValueObject::ExpandArraySliceExpression(
                         }
                     }
                     // from here on we do have a valid index
-                    if (root_clang_type_info.Test(ClangASTType::eTypeIsArray))
+                    if (root_clang_type_info.Test(eTypeIsArray))
                     {
                         root = root->GetChildAtIndex(index, true);
                         if (!root.get())
@@ -3328,10 +3328,10 @@ ValueObject::ExpandArraySliceExpression(
                             return 1;
                         }
                     }
-                    else if (root_clang_type_info.Test(ClangASTType::eTypeIsPointer))
+                    else if (root_clang_type_info.Test(eTypeIsPointer))
                     {
                         if (*what_next == ValueObject::eExpressionPathAftermathDereference &&  // if this is a ptr-to-scalar, I am accessing it by index and I would have deref'ed anyway, then do it now and use this as a bitfield
-                            pointee_clang_type_info.Test(ClangASTType::eTypeIsScalar))
+                            pointee_clang_type_info.Test(eTypeIsScalar))
                         {
                             Error error;
                             root = root->Dereference(error);
@@ -3413,7 +3413,7 @@ ValueObject::ExpandArraySliceExpression(
                         index_lower = index_higher;
                         index_higher = temp;
                     }
-                    if (root_clang_type_info.Test(ClangASTType::eTypeIsScalar)) // expansion only works for scalars
+                    if (root_clang_type_info.Test(eTypeIsScalar)) // expansion only works for scalars
                     {
                         root = root->GetSyntheticBitFieldChild(index_lower, index_higher, true);
                         if (!root.get())
@@ -3432,9 +3432,9 @@ ValueObject::ExpandArraySliceExpression(
                             return 1;
                         }
                     }
-                    else if (root_clang_type_info.Test(ClangASTType::eTypeIsPointer) && // if this is a ptr-to-scalar, I am accessing it by index and I would have deref'ed anyway, then do it now and use this as a bitfield
+                    else if (root_clang_type_info.Test(eTypeIsPointer) && // if this is a ptr-to-scalar, I am accessing it by index and I would have deref'ed anyway, then do it now and use this as a bitfield
                              *what_next == ValueObject::eExpressionPathAftermathDereference &&
-                             pointee_clang_type_info.Test(ClangASTType::eTypeIsScalar))
+                             pointee_clang_type_info.Test(eTypeIsScalar))
                     {
                         Error error;
                         root = root->Dereference(error);
@@ -3609,13 +3609,13 @@ ValueObject::GetCPPVTableAddress (Addres
     if (type_info)
     {
         bool ptr_or_ref = false;
-        if (type_info & (ClangASTType::eTypeIsPointer | ClangASTType::eTypeIsReference))
+        if (type_info & (eTypeIsPointer | eTypeIsReference))
         {
             ptr_or_ref = true;
             type_info = pointee_type.GetTypeInfo();
         }
         
-        const uint32_t cpp_class = ClangASTType::eTypeIsClass | ClangASTType::eTypeIsCPlusPlus;
+        const uint32_t cpp_class = eTypeIsClass | eTypeIsCPlusPlus;
         if ((type_info & cpp_class) == cpp_class)
         {
             if (ptr_or_ref)

Modified: lldb/trunk/source/Core/ValueObjectChild.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectChild.cpp?rev=220322&r1=220321&r2=220322&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectChild.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectChild.cpp Tue Oct 21 15:52:14 2014
@@ -208,7 +208,7 @@ ValueObjectChild::UpdateValue ()
             {
                 const bool thread_and_frame_only_if_stopped = true;
                 ExecutionContext exe_ctx (GetExecutionContextRef().Lock(thread_and_frame_only_if_stopped));
-                if (GetClangType().GetTypeInfo() & ClangASTType::eTypeHasValue)
+                if (GetClangType().GetTypeInfo() & lldb::eTypeHasValue)
                     m_error = m_value.GetValueAsData (&exe_ctx, m_data, 0, GetModule().get());
                 else
                     m_error.Clear(); // No value so nothing to read...

Modified: lldb/trunk/source/DataFormatters/CXXFormatterFunctions.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/CXXFormatterFunctions.cpp?rev=220322&r1=220321&r2=220322&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/CXXFormatterFunctions.cpp (original)
+++ lldb/trunk/source/DataFormatters/CXXFormatterFunctions.cpp Tue Oct 21 15:52:14 2014
@@ -1261,14 +1261,14 @@ lldb_private::formatters::ObjCBOOLSummar
     
     ValueObjectSP real_guy_sp = valobj.GetSP();
     
-    if (type_info & ClangASTType::eTypeIsPointer)
+    if (type_info & eTypeIsPointer)
     {
         Error err;
         real_guy_sp = valobj.Dereference(err);
         if (err.Fail() || !real_guy_sp)
             return false;
     }
-    else if (type_info & ClangASTType::eTypeIsReference)
+    else if (type_info & eTypeIsReference)
     {
         real_guy_sp =  valobj.GetChildAtIndex(0, true);
         if (!real_guy_sp)

Modified: lldb/trunk/source/DataFormatters/NSArray.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/NSArray.cpp?rev=220322&r1=220321&r2=220322&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/NSArray.cpp (original)
+++ lldb/trunk/source/DataFormatters/NSArray.cpp Tue Oct 21 15:52:14 2014
@@ -624,7 +624,7 @@ SyntheticChildrenFrontEnd* lldb_private:
     ClangASTType valobj_type(valobj_sp->GetClangType());
     Flags flags(valobj_type.GetTypeInfo());
     
-    if (flags.IsClear(ClangASTType::eTypeIsPointer))
+    if (flags.IsClear(eTypeIsPointer))
     {
         Error error;
         valobj_sp = valobj_sp->AddressOf(error);

Modified: lldb/trunk/source/DataFormatters/TypeFormat.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/TypeFormat.cpp?rev=220322&r1=220321&r2=220322&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/TypeFormat.cpp (original)
+++ lldb/trunk/source/DataFormatters/TypeFormat.cpp Tue Oct 21 15:52:14 2014
@@ -99,7 +99,7 @@ TypeFormatImpl_Format::FormatObject (Val
                 if (GetFormat() == eFormatCString)
                 {
                     lldb_private::Flags type_flags(clang_type.GetTypeInfo(NULL)); // disambiguate w.r.t. TypeFormatImpl::Flags
-                    if (type_flags.Test(ClangASTType::eTypeIsPointer) && !type_flags.Test(ClangASTType::eTypeIsObjC))
+                    if (type_flags.Test(eTypeIsPointer) && !type_flags.Test(eTypeIsObjC))
                     {
                         // if we are dumping a pointer as a c-string, get the pointee data as a string
                         TargetSP target_sp(valobj->GetTargetSP());
@@ -209,7 +209,7 @@ TypeFormatImpl_EnumType::FormatObject (V
         {
             if (!type_sp)
                 continue;
-            if ( (type_sp->GetClangForwardType().GetTypeInfo() & ClangASTType::eTypeIsEnumeration) == ClangASTType::eTypeIsEnumeration)
+            if ( (type_sp->GetClangForwardType().GetTypeInfo() & eTypeIsEnumeration) == eTypeIsEnumeration)
             {
                 valobj_enum_type = type_sp->GetClangFullType();
                 m_types.emplace(valobj_key,valobj_enum_type);

Modified: lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp?rev=220322&r1=220321&r2=220322&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp (original)
+++ lldb/trunk/source/DataFormatters/ValueObjectPrinter.cpp Tue Oct 21 15:52:14 2014
@@ -183,7 +183,7 @@ bool
 ValueObjectPrinter::ShouldPrintValueObject ()
 {
     if (m_should_print == eLazyBoolCalculate)
-        m_should_print = (options.m_flat_output == false || m_type_flags.Test (ClangASTType::eTypeHasValue)) ? eLazyBoolYes : eLazyBoolNo;
+        m_should_print = (options.m_flat_output == false || m_type_flags.Test (eTypeHasValue)) ? eLazyBoolYes : eLazyBoolNo;
     return m_should_print == eLazyBoolYes;
 }
 
@@ -199,7 +199,7 @@ bool
 ValueObjectPrinter::IsPtr ()
 {
     if (m_is_ptr == eLazyBoolCalculate)
-        m_is_ptr = m_type_flags.Test (ClangASTType::eTypeIsPointer) ? eLazyBoolYes : eLazyBoolNo;
+        m_is_ptr = m_type_flags.Test (eTypeIsPointer) ? eLazyBoolYes : eLazyBoolNo;
     return m_is_ptr == eLazyBoolYes;
 }
 
@@ -207,7 +207,7 @@ bool
 ValueObjectPrinter::IsRef ()
 {
     if (m_is_ref == eLazyBoolCalculate)
-        m_is_ref = m_type_flags.Test (ClangASTType::eTypeIsReference) ? eLazyBoolYes : eLazyBoolNo;
+        m_is_ref = m_type_flags.Test (eTypeIsReference) ? eLazyBoolYes : eLazyBoolNo;
     return m_is_ref == eLazyBoolYes;
 }
 
@@ -215,7 +215,7 @@ bool
 ValueObjectPrinter::IsAggregate ()
 {
     if (m_is_aggregate == eLazyBoolCalculate)
-        m_is_aggregate = m_type_flags.Test (ClangASTType::eTypeHasChildren) ? eLazyBoolYes : eLazyBoolNo;
+        m_is_aggregate = m_type_flags.Test (eTypeHasChildren) ? eLazyBoolYes : eLazyBoolNo;
     return m_is_aggregate == eLazyBoolYes;
 }
 

Modified: lldb/trunk/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp?rev=220322&r1=220321&r2=220322&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp (original)
+++ lldb/trunk/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp Tue Oct 21 15:52:14 2014
@@ -440,11 +440,11 @@ ABIMacOSX_arm64::SetReturnValueObject(ll
         }
 
         const uint32_t type_flags = return_value_type.GetTypeInfo (NULL);
-        if (type_flags & ClangASTType::eTypeIsScalar ||
-            type_flags & ClangASTType::eTypeIsPointer)
+        if (type_flags & eTypeIsScalar ||
+            type_flags & eTypeIsPointer)
         {
-            if (type_flags & ClangASTType::eTypeIsInteger ||
-                type_flags & ClangASTType::eTypeIsPointer )
+            if (type_flags & eTypeIsInteger ||
+                type_flags & eTypeIsPointer )
             {
                 // Extract the register context so we can read arguments from registers
                 lldb::offset_t offset = 0;
@@ -477,9 +477,9 @@ ABIMacOSX_arm64::SetReturnValueObject(ll
                     error.SetErrorString("We don't support returning longer than 128 bit integer values at present.");
                 }
             }
-            else if (type_flags & ClangASTType::eTypeIsFloat)
+            else if (type_flags & eTypeIsFloat)
             {
-                if (type_flags & ClangASTType::eTypeIsComplex)
+                if (type_flags & eTypeIsComplex)
                 {
                     // Don't handle complex yet.
                     error.SetErrorString ("returning complex float values are not supported");
@@ -519,7 +519,7 @@ ABIMacOSX_arm64::SetReturnValueObject(ll
                 }
             }
         }
-        else if (type_flags & ClangASTType::eTypeIsVector)
+        else if (type_flags & eTypeIsVector)
         {
             if (byte_size > 0)
             {
@@ -874,14 +874,14 @@ ABIMacOSX_arm64::GetReturnValueObjectImp
     const size_t byte_size = return_clang_type.GetByteSize();
 
     const uint32_t type_flags = return_clang_type.GetTypeInfo (NULL);
-    if (type_flags & ClangASTType::eTypeIsScalar ||
-        type_flags & ClangASTType::eTypeIsPointer)
+    if (type_flags & eTypeIsScalar ||
+        type_flags & eTypeIsPointer)
     {
         value.SetValueType(Value::eValueTypeScalar);
         
         bool success = false;
-        if (type_flags & ClangASTType::eTypeIsInteger ||
-            type_flags & ClangASTType::eTypeIsPointer )
+        if (type_flags & eTypeIsInteger ||
+            type_flags & eTypeIsPointer )
         {
             // Extract the register context so we can read arguments from registers
             if (byte_size <= 8)
@@ -890,7 +890,7 @@ ABIMacOSX_arm64::GetReturnValueObjectImp
                 if (x0_reg_info)
                 {
                     uint64_t raw_value = thread.GetRegisterContext()->ReadRegisterAsUnsigned(x0_reg_info, 0);
-                    const bool is_signed = (type_flags & ClangASTType::eTypeIsSigned) != 0;
+                    const bool is_signed = (type_flags & eTypeIsSigned) != 0;
                     switch (byte_size)
                     {
                         default:
@@ -965,9 +965,9 @@ ABIMacOSX_arm64::GetReturnValueObjectImp
                 }
             }
         }
-        else if (type_flags & ClangASTType::eTypeIsFloat)
+        else if (type_flags & eTypeIsFloat)
         {
-            if (type_flags & ClangASTType::eTypeIsComplex)
+            if (type_flags & eTypeIsComplex)
             {
                 // Don't handle complex yet.
             }
@@ -1010,7 +1010,7 @@ ABIMacOSX_arm64::GetReturnValueObjectImp
                                                                ConstString(""));
         
     }
-    else if (type_flags & ClangASTType::eTypeIsVector)
+    else if (type_flags & eTypeIsVector)
     {
         if (byte_size > 0)
         {
@@ -1046,8 +1046,8 @@ ABIMacOSX_arm64::GetReturnValueObjectImp
             }
         }
     }
-    else if (type_flags & ClangASTType::eTypeIsStructUnion ||
-             type_flags & ClangASTType::eTypeIsClass)
+    else if (type_flags & eTypeIsStructUnion ||
+             type_flags & eTypeIsClass)
     {
         DataExtractor data;
         

Modified: lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp?rev=220322&r1=220321&r2=220322&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp (original)
+++ lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp Tue Oct 21 15:52:14 2014
@@ -649,18 +649,18 @@ ABISysV_x86_64::GetReturnValueObjectSimp
         return return_valobj_sp;
     
     const uint32_t type_flags = return_clang_type.GetTypeInfo ();
-    if (type_flags & ClangASTType::eTypeIsScalar)
+    if (type_flags & eTypeIsScalar)
     {
         value.SetValueType(Value::eValueTypeScalar);
 
         bool success = false;
-        if (type_flags & ClangASTType::eTypeIsInteger)
+        if (type_flags & eTypeIsInteger)
         {
             // Extract the register context so we can read arguments from registers
             
             const size_t byte_size = return_clang_type.GetByteSize();
             uint64_t raw_value = thread.GetRegisterContext()->ReadRegisterAsUnsigned(reg_ctx->GetRegisterInfoByName("rax", 0), 0);
-            const bool is_signed = (type_flags & ClangASTType::eTypeIsSigned) != 0;
+            const bool is_signed = (type_flags & eTypeIsSigned) != 0;
             switch (byte_size)
             {
             default:
@@ -699,9 +699,9 @@ ABISysV_x86_64::GetReturnValueObjectSimp
                 break;
             }
         }
-        else if (type_flags & ClangASTType::eTypeIsFloat)
+        else if (type_flags & eTypeIsFloat)
         {
-            if (type_flags & ClangASTType::eTypeIsComplex)
+            if (type_flags & eTypeIsComplex)
             {
                 // Don't handle complex yet.
             }
@@ -744,7 +744,7 @@ ABISysV_x86_64::GetReturnValueObjectSimp
                                                                ConstString(""));
 
     }
-    else if (type_flags & ClangASTType::eTypeIsPointer)
+    else if (type_flags & eTypeIsPointer)
     {
         unsigned rax_id = reg_ctx->GetRegisterInfoByName("rax", 0)->kinds[eRegisterKindLLDB];
         value.GetScalar() = (uint64_t)thread.GetRegisterContext()->ReadRegisterAsUnsigned(rax_id, 0);
@@ -753,7 +753,7 @@ ABISysV_x86_64::GetReturnValueObjectSimp
                                                            value,
                                                            ConstString(""));
     }
-    else if (type_flags & ClangASTType::eTypeIsVector)
+    else if (type_flags & eTypeIsVector)
     {
         const size_t byte_size = return_clang_type.GetByteSize();
         if (byte_size > 0)

Modified: lldb/trunk/source/Target/StackFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/StackFrame.cpp?rev=220322&r1=220321&r2=220322&view=diff
==============================================================================
--- lldb/trunk/source/Target/StackFrame.cpp (original)
+++ lldb/trunk/source/Target/StackFrame.cpp Tue Oct 21 15:52:14 2014
@@ -691,8 +691,8 @@ StackFrame::GetValueForVariableExpressio
                             // Make sure we aren't trying to deref an objective
                             // C ivar if this is not allowed
                             const uint32_t pointer_type_flags = valobj_sp->GetClangType().GetTypeInfo (NULL);
-                            if ((pointer_type_flags & ClangASTType::eTypeIsObjC) &&
-                                (pointer_type_flags & ClangASTType::eTypeIsPointer))
+                            if ((pointer_type_flags & eTypeIsObjC) &&
+                                (pointer_type_flags & eTypeIsPointer))
                             {
                                 // This was an objective C object pointer and 
                                 // it was requested we skip any fragile ivars





More information about the lldb-commits mailing list