diff options
Diffstat (limited to 'lldb/source/Core')
-rw-r--r-- | lldb/source/Core/Value.cpp | 32 | ||||
-rw-r--r-- | lldb/source/Core/ValueObject.cpp | 150 | ||||
-rw-r--r-- | lldb/source/Core/ValueObjectCast.cpp | 6 | ||||
-rw-r--r-- | lldb/source/Core/ValueObjectChild.cpp | 12 | ||||
-rw-r--r-- | lldb/source/Core/ValueObjectConstResult.cpp | 32 | ||||
-rw-r--r-- | lldb/source/Core/ValueObjectConstResultCast.cpp | 4 | ||||
-rw-r--r-- | lldb/source/Core/ValueObjectConstResultChild.cpp | 8 | ||||
-rw-r--r-- | lldb/source/Core/ValueObjectConstResultImpl.cpp | 36 | ||||
-rw-r--r-- | lldb/source/Core/ValueObjectMemory.cpp | 26 | ||||
-rw-r--r-- | lldb/source/Core/ValueObjectRegister.cpp | 10 | ||||
-rw-r--r-- | lldb/source/Core/ValueObjectVariable.cpp | 8 |
11 files changed, 162 insertions, 162 deletions
diff --git a/lldb/source/Core/Value.cpp b/lldb/source/Core/Value.cpp index 01d7927dce5..349f7780c70 100644 --- a/lldb/source/Core/Value.cpp +++ b/lldb/source/Core/Value.cpp @@ -35,7 +35,7 @@ using namespace lldb_private; Value::Value() : m_value (), m_vector (), - m_clang_type (), + m_compiler_type (), m_context (NULL), m_value_type (eValueTypeScalar), m_context_type (eContextTypeInvalid), @@ -46,7 +46,7 @@ Value::Value() : Value::Value(const Scalar& scalar) : m_value (scalar), m_vector (), - m_clang_type (), + m_compiler_type (), m_context (NULL), m_value_type (eValueTypeScalar), m_context_type (eContextTypeInvalid), @@ -58,7 +58,7 @@ Value::Value(const Scalar& scalar) : Value::Value(const void *bytes, int len) : m_value (), m_vector (), - m_clang_type (), + m_compiler_type (), m_context (NULL), m_value_type (eValueTypeHostAddress), m_context_type (eContextTypeInvalid), @@ -70,7 +70,7 @@ Value::Value(const void *bytes, int len) : Value::Value(const Value &v) : m_value (v.m_value), m_vector (v.m_vector), - m_clang_type (v.m_clang_type), + m_compiler_type (v.m_compiler_type), m_context (v.m_context), m_value_type (v.m_value_type), m_context_type (v.m_context_type), @@ -93,7 +93,7 @@ Value::operator=(const Value &rhs) { m_value = rhs.m_value; m_vector = rhs.m_vector; - m_clang_type = rhs.m_clang_type; + m_compiler_type = rhs.m_compiler_type; m_context = rhs.m_context; m_value_type = rhs.m_value_type; m_context_type = rhs.m_context_type; @@ -300,7 +300,7 @@ Value::GetValueByteSize (Error *error_ptr) const CompilerType & Value::GetCompilerType () { - if (!m_clang_type.IsValid()) + if (!m_compiler_type.IsValid()) { switch (m_context_type) { @@ -308,13 +308,13 @@ Value::GetCompilerType () break; case eContextTypeRegisterInfo: - break; // TODO: Eventually convert into a clang type? + break; // TODO: Eventually convert into a compiler type? case eContextTypeLLDBType: { Type *lldb_type = GetType(); if (lldb_type) - m_clang_type = lldb_type->GetForwardCompilerType (); + m_compiler_type = lldb_type->GetForwardCompilerType (); } break; @@ -325,20 +325,20 @@ Value::GetCompilerType () { Type *variable_type = variable->GetType(); if (variable_type) - m_clang_type = variable_type->GetForwardCompilerType (); + m_compiler_type = variable_type->GetForwardCompilerType (); } } break; } } - return m_clang_type; + return m_compiler_type; } void -Value::SetCompilerType (const CompilerType &clang_type) +Value::SetCompilerType (const CompilerType &compiler_type) { - m_clang_type = clang_type; + m_compiler_type = compiler_type; } lldb::Format @@ -721,8 +721,8 @@ Value::GetValueAsData (ExecutionContext *exe_ctx, Scalar & Value::ResolveValue(ExecutionContext *exe_ctx) { - const CompilerType &clang_type = GetCompilerType(); - if (clang_type.IsValid()) + const CompilerType &compiler_type = GetCompilerType(); + if (compiler_type.IsValid()) { switch (m_value_type) { @@ -740,7 +740,7 @@ Value::ResolveValue(ExecutionContext *exe_ctx) if (error.Success()) { Scalar scalar; - if (clang_type.GetValueAsScalar (data, 0, data.GetByteSize(), scalar)) + if (compiler_type.GetValueAsScalar (data, 0, data.GetByteSize(), scalar)) { m_value = scalar; m_value_type = eValueTypeScalar; @@ -782,7 +782,7 @@ Value::Clear() { m_value.Clear(); m_vector.Clear(); - m_clang_type.Clear(); + m_compiler_type.Clear(); m_value_type = eValueTypeScalar; m_context = NULL; m_context_type = eContextTypeInvalid; diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp index 4dd7c553f3b..7ca9ebf08d5 100644 --- a/lldb/source/Core/ValueObject.cpp +++ b/lldb/source/Core/ValueObject.cpp @@ -324,30 +324,30 @@ ValueObject::ClearDynamicTypeInformation () CompilerType ValueObject::MaybeCalculateCompleteType () { - CompilerType clang_type(GetCompilerTypeImpl()); + CompilerType compiler_type(GetCompilerTypeImpl()); if (m_did_calculate_complete_objc_class_type) { if (m_override_type.IsValid()) return m_override_type; else - return clang_type; + return compiler_type; } CompilerType class_type; bool is_pointer_type = false; - if (ClangASTContext::IsObjCObjectPointerType(clang_type, &class_type)) + if (ClangASTContext::IsObjCObjectPointerType(compiler_type, &class_type)) { is_pointer_type = true; } - else if (ClangASTContext::IsObjCObjectOrInterfaceType(clang_type)) + else if (ClangASTContext::IsObjCObjectOrInterfaceType(compiler_type)) { - class_type = clang_type; + class_type = compiler_type; } else { - return clang_type; + return compiler_type; } m_did_calculate_complete_objc_class_type = true; @@ -391,7 +391,7 @@ ValueObject::MaybeCalculateCompleteType () } } } - return clang_type; + return compiler_type; } CompilerType @@ -936,10 +936,10 @@ ValueObject::GetSummaryAsCString (std::string& destination, bool ValueObject::IsCStringContainer(bool check_pointer) { - CompilerType pointee_or_element_clang_type; - const Flags type_flags (GetTypeInfo (&pointee_or_element_clang_type)); + CompilerType pointee_or_element_compiler_type; + const Flags type_flags (GetTypeInfo (&pointee_or_element_compiler_type)); bool is_char_arr_ptr (type_flags.AnySet (eTypeIsArray | eTypeIsPointer) && - pointee_or_element_clang_type.IsCharType ()); + pointee_or_element_compiler_type.IsCharType ()); if (!is_char_arr_ptr) return false; if (!check_pointer) @@ -957,8 +957,8 @@ ValueObject::GetPointeeData (DataExtractor& data, uint32_t item_idx, uint32_t item_count) { - CompilerType pointee_or_element_clang_type; - const uint32_t type_info = GetTypeInfo (&pointee_or_element_clang_type); + CompilerType pointee_or_element_compiler_type; + const uint32_t type_info = GetTypeInfo (&pointee_or_element_compiler_type); const bool is_pointer_type = type_info & eTypeIsPointer; const bool is_array_type = type_info & eTypeIsArray; if (!(is_pointer_type || is_array_type)) @@ -969,7 +969,7 @@ ValueObject::GetPointeeData (DataExtractor& data, ExecutionContext exe_ctx (GetExecutionContextRef()); - const uint64_t item_type_size = pointee_or_element_clang_type.GetByteSize(exe_ctx.GetBestExecutionContextScope()); + const uint64_t item_type_size = pointee_or_element_compiler_type.GetByteSize(exe_ctx.GetBestExecutionContextScope()); const uint64_t bytes = item_count * item_type_size; const uint64_t offset = item_idx * item_type_size; @@ -1225,11 +1225,11 @@ ValueObject::ReadPointedString (lldb::DataBufferSP& buffer_sp, size_t bytes_read = 0; size_t total_bytes_read = 0; - CompilerType clang_type = GetCompilerType(); - CompilerType elem_or_pointee_clang_type; - const Flags type_flags (GetTypeInfo (&elem_or_pointee_clang_type)); + CompilerType compiler_type = GetCompilerType(); + CompilerType elem_or_pointee_compiler_type; + const Flags type_flags (GetTypeInfo (&elem_or_pointee_compiler_type)); if (type_flags.AnySet (eTypeIsArray | eTypeIsPointer) && - elem_or_pointee_clang_type.IsCharType ()) + elem_or_pointee_compiler_type.IsCharType ()) { addr_t cstr_address = LLDB_INVALID_ADDRESS; AddressType cstr_address_type = eAddressTypeInvalid; @@ -1240,7 +1240,7 @@ ValueObject::ReadPointedString (lldb::DataBufferSP& buffer_sp, { // We have an array uint64_t array_size = 0; - if (clang_type.IsArrayType(NULL, &array_size, NULL)) + if (compiler_type.IsArrayType(NULL, &array_size, NULL)) { cstr_len = array_size; if (cstr_len > max_length) @@ -1384,11 +1384,11 @@ ValueObject::GetObjectDescription () if (runtime == NULL) { // Aw, hell, if the things a pointer, or even just an integer, let's try ObjC anyway... - CompilerType clang_type = GetCompilerType(); - if (clang_type) + CompilerType compiler_type = GetCompilerType(); + if (compiler_type) { bool is_signed; - if (clang_type.IsIntegerType (is_signed) || clang_type.IsPointerType ()) + if (compiler_type.IsIntegerType (is_signed) || compiler_type.IsPointerType ()) { runtime = process->GetLanguageRuntime(eLanguageTypeObjC); } @@ -2022,9 +2022,9 @@ ValueObject::GetSyntheticChild (const ConstString &key) const } uint32_t -ValueObject::GetTypeInfo (CompilerType *pointee_or_element_clang_type) +ValueObject::GetTypeInfo (CompilerType *pointee_or_element_compiler_type) { - return GetCompilerType().GetTypeInfo (pointee_or_element_clang_type); + return GetCompilerType().GetTypeInfo (pointee_or_element_compiler_type); } bool @@ -2416,9 +2416,9 @@ ValueObject::GetBaseClassPath (Stream &s) if (IsBaseClass()) { bool parent_had_base_class = GetParent() && GetParent()->GetBaseClassPath (s); - CompilerType clang_type = GetCompilerType(); + CompilerType compiler_type = GetCompilerType(); std::string cxx_class_name; - bool this_had_base_class = ClangASTContext::GetCXXClassName (clang_type, cxx_class_name); + bool this_had_base_class = ClangASTContext::GetCXXClassName (compiler_type, cxx_class_name); if (this_had_base_class) { if (parent_had_base_class) @@ -2535,8 +2535,8 @@ ValueObject::GetExpressionPath (Stream &s, bool qualify_cxx_base_classes, GetExp ValueObject *non_base_class_parent = GetNonBaseClassParent(); if (non_base_class_parent) { - CompilerType non_base_class_parent_clang_type = non_base_class_parent->GetCompilerType(); - if (non_base_class_parent_clang_type) + CompilerType non_base_class_parent_compiler_type = non_base_class_parent->GetCompilerType(); + if (non_base_class_parent_compiler_type) { if (parent && parent->IsDereferenceOfParent() && epformat == eGetExpressionPathFormatHonorPointers) { @@ -2544,7 +2544,7 @@ ValueObject::GetExpressionPath (Stream &s, bool qualify_cxx_base_classes, GetExp } else { - const uint32_t non_base_class_parent_type_info = non_base_class_parent_clang_type.GetTypeInfo(); + const uint32_t non_base_class_parent_type_info = non_base_class_parent_compiler_type.GetTypeInfo(); if (non_base_class_parent_type_info & eTypeIsPointer) { @@ -2756,13 +2756,13 @@ ValueObject::GetValueForExpressionPath_Impl(const char* expression_cstr, const char* expression_cstr = *first_unparsed; // hide the top level expression_cstr - CompilerType root_clang_type = root->GetCompilerType(); - CompilerType pointee_clang_type; - Flags pointee_clang_type_info; + CompilerType root_compiler_type = root->GetCompilerType(); + CompilerType pointee_compiler_type; + Flags pointee_compiler_type_info; - Flags root_clang_type_info(root_clang_type.GetTypeInfo(&pointee_clang_type)); - if (pointee_clang_type) - pointee_clang_type_info.Reset(pointee_clang_type.GetTypeInfo()); + Flags root_compiler_type_info(root_compiler_type.GetTypeInfo(&pointee_compiler_type)); + if (pointee_compiler_type) + pointee_compiler_type_info.Reset(pointee_compiler_type.GetTypeInfo()); if (!expression_cstr || *expression_cstr == '\0') { @@ -2775,15 +2775,15 @@ ValueObject::GetValueForExpressionPath_Impl(const char* expression_cstr, case '-': { if (options.m_check_dot_vs_arrow_syntax && - root_clang_type_info.Test(eTypeIsPointer) ) // if you are trying to use -> on a non-pointer and I must catch the error + root_compiler_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(eTypeIsObjC) && // if yo are trying to extract an ObjC IVar when this is forbidden - root_clang_type_info.Test(eTypeIsPointer) && + if (root_compiler_type_info.Test(eTypeIsObjC) && // if yo are trying to extract an ObjC IVar when this is forbidden + root_compiler_type_info.Test(eTypeIsPointer) && options.m_no_fragile_ivar) { *first_unparsed = expression_cstr; @@ -2803,7 +2803,7 @@ ValueObject::GetValueForExpressionPath_Impl(const char* expression_cstr, case '.': // or fallthrough from -> { if (options.m_check_dot_vs_arrow_syntax && *expression_cstr == '.' && - root_clang_type_info.Test(eTypeIsPointer)) // if you are trying to use . on a pointer and I must catch the error + root_compiler_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; @@ -2952,9 +2952,9 @@ ValueObject::GetValueForExpressionPath_Impl(const char* expression_cstr, } case '[': { - 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_compiler_type_info.Test(eTypeIsArray) && !root_compiler_type_info.Test(eTypeIsPointer) && !root_compiler_type_info.Test(eTypeIsVector)) // if this is not a T[] nor a T* { - if (!root_clang_type_info.Test(eTypeIsScalar)) // if this is not even a scalar... + if (!root_compiler_type_info.Test(eTypeIsScalar)) // if this is not even a scalar... { if (options.m_synthetic_children_traversal == GetValueForExpressionPathOptions::SyntheticChildrenTraversal::None) // ...only chance left is synthetic { @@ -2974,7 +2974,7 @@ ValueObject::GetValueForExpressionPath_Impl(const char* expression_cstr, } if (*(expression_cstr+1) == ']') // if this is an unbounded range it only works for arrays { - if (!root_clang_type_info.Test(eTypeIsArray)) + if (!root_compiler_type_info.Test(eTypeIsArray)) { *first_unparsed = expression_cstr; *reason_to_stop = ValueObject::eExpressionPathScanEndReasonEmptyRangeNotAllowed; @@ -3011,7 +3011,7 @@ ValueObject::GetValueForExpressionPath_Impl(const char* expression_cstr, } if (end - expression_cstr == 1) // if this is [], only return a valid value for arrays { - if (root_clang_type_info.Test(eTypeIsArray)) + if (root_compiler_type_info.Test(eTypeIsArray)) { *first_unparsed = expression_cstr+2; *reason_to_stop = ValueObject::eExpressionPathScanEndReasonArrayRangeOperatorMet; @@ -3027,7 +3027,7 @@ ValueObject::GetValueForExpressionPath_Impl(const char* expression_cstr, } } // from here on we do have a valid index - if (root_clang_type_info.Test(eTypeIsArray)) + if (root_compiler_type_info.Test(eTypeIsArray)) { ValueObjectSP child_valobj_sp = root->GetChildAtIndex(index, true); if (!child_valobj_sp) @@ -3050,10 +3050,10 @@ ValueObject::GetValueForExpressionPath_Impl(const char* expression_cstr, return ValueObjectSP(); } } - else if (root_clang_type_info.Test(eTypeIsPointer)) + else if (root_compiler_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(eTypeIsScalar)) + pointee_compiler_type_info.Test(eTypeIsScalar)) { Error error; root = root->Dereference(error); @@ -3073,7 +3073,7 @@ ValueObject::GetValueForExpressionPath_Impl(const char* expression_cstr, else { if (root->GetCompilerType().GetMinimumLanguage() == eLanguageTypeObjC - && pointee_clang_type_info.AllClear(eTypeIsPointer) + && pointee_compiler_type_info.AllClear(eTypeIsPointer) && root->HasSyntheticValue() && (options.m_synthetic_children_traversal == GetValueForExpressionPathOptions::SyntheticChildrenTraversal::ToSynthetic || options.m_synthetic_children_traversal == GetValueForExpressionPathOptions::SyntheticChildrenTraversal::Both)) @@ -3097,7 +3097,7 @@ ValueObject::GetValueForExpressionPath_Impl(const char* expression_cstr, } } } - else if (root_clang_type_info.Test(eTypeIsScalar)) + else if (root_compiler_type_info.Test(eTypeIsScalar)) { root = root->GetSyntheticBitFieldChild(index, index, true); if (!root.get()) @@ -3115,7 +3115,7 @@ ValueObject::GetValueForExpressionPath_Impl(const char* expression_cstr, return root; } } - else if (root_clang_type_info.Test(eTypeIsVector)) + else if (root_compiler_type_info.Test(eTypeIsVector)) { root = root->GetChildAtIndex(index, true); if (!root.get()) @@ -3201,7 +3201,7 @@ ValueObject::GetValueForExpressionPath_Impl(const char* expression_cstr, index_lower = index_higher; index_higher = temp; } - if (root_clang_type_info.Test(eTypeIsScalar)) // expansion only works for scalars + if (root_compiler_type_info.Test(eTypeIsScalar)) // expansion only works for scalars { root = root->GetSyntheticBitFieldChild(index_lower, index_higher, true); if (!root.get()) @@ -3219,9 +3219,9 @@ ValueObject::GetValueForExpressionPath_Impl(const char* expression_cstr, return root; } } - 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 + else if (root_compiler_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(eTypeIsScalar)) + pointee_compiler_type_info.Test(eTypeIsScalar)) { Error error; root = root->Dereference(error); @@ -3280,12 +3280,12 @@ ValueObject::ExpandArraySliceExpression(const char* expression_cstr, const char* expression_cstr = *first_unparsed; // hide the top level expression_cstr - CompilerType root_clang_type = root->GetCompilerType(); - CompilerType pointee_clang_type; - Flags pointee_clang_type_info; - Flags root_clang_type_info(root_clang_type.GetTypeInfo(&pointee_clang_type)); - if (pointee_clang_type) - pointee_clang_type_info.Reset(pointee_clang_type.GetTypeInfo()); + CompilerType root_compiler_type = root->GetCompilerType(); + CompilerType pointee_compiler_type; + Flags pointee_compiler_type_info; + Flags root_compiler_type_info(root_compiler_type.GetTypeInfo(&pointee_compiler_type)); + if (pointee_compiler_type) + pointee_compiler_type_info.Reset(pointee_compiler_type.GetTypeInfo()); if (!expression_cstr || *expression_cstr == '\0') { @@ -3298,9 +3298,9 @@ ValueObject::ExpandArraySliceExpression(const char* expression_cstr, { case '[': { - if (!root_clang_type_info.Test(eTypeIsArray) && !root_clang_type_info.Test(eTypeIsPointer)) // if this is not a T[] nor a T* + if (!root_compiler_type_info.Test(eTypeIsArray) && !root_compiler_type_info.Test(eTypeIsPointer)) // if this is not a T[] nor a T* { - if (!root_clang_type_info.Test(eTypeIsScalar)) // if this is not even a scalar, this syntax is just plain wrong! + if (!root_compiler_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; @@ -3317,7 +3317,7 @@ ValueObject::ExpandArraySliceExpression(const char* expression_cstr, } if (*(expression_cstr+1) == ']') // if this is an unbounded range it only works for arrays { - if (!root_clang_type_info.Test(eTypeIsArray)) + if (!root_compiler_type_info.Test(eTypeIsArray)) { *first_unparsed = expression_cstr; *reason_to_stop = ValueObject::eExpressionPathScanEndReasonEmptyRangeNotAllowed; @@ -3361,7 +3361,7 @@ ValueObject::ExpandArraySliceExpression(const char* expression_cstr, } if (end - expression_cstr == 1) // if this is [], only return a valid value for arrays { - if (root_clang_type_info.Test(eTypeIsArray)) + if (root_compiler_type_info.Test(eTypeIsArray)) { const size_t max_index = root->GetNumChildren() - 1; for (size_t index = 0; index < max_index; index++) @@ -3384,7 +3384,7 @@ ValueObject::ExpandArraySliceExpression(const char* expression_cstr, } } // from here on we do have a valid index - if (root_clang_type_info.Test(eTypeIsArray)) + if (root_compiler_type_info.Test(eTypeIsArray)) { root = root->GetChildAtIndex(index, true); if (!root.get()) @@ -3403,10 +3403,10 @@ ValueObject::ExpandArraySliceExpression(const char* expression_cstr, return 1; } } - else if (root_clang_type_info.Test(eTypeIsPointer)) + else if (root_compiler_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(eTypeIsScalar)) + pointee_compiler_type_info.Test(eTypeIsScalar)) { Error error; root = root->Dereference(error); @@ -3443,7 +3443,7 @@ ValueObject::ExpandArraySliceExpression(const char* expression_cstr, } } } - else /*if (ClangASTContext::IsScalarType(root_clang_type))*/ + else /*if (ClangASTContext::IsScalarType(root_compiler_type))*/ { root = root->GetSyntheticBitFieldChild(index, index, true); if (!root.get()) @@ -3488,7 +3488,7 @@ ValueObject::ExpandArraySliceExpression(const char* expression_cstr, index_lower = index_higher; index_higher = temp; } - if (root_clang_type_info.Test(eTypeIsScalar)) // expansion only works for scalars + if (root_compiler_type_info.Test(eTypeIsScalar)) // expansion only works for scalars { root = root->GetSyntheticBitFieldChild(index_lower, index_higher, true); if (!root.get()) @@ -3507,9 +3507,9 @@ ValueObject::ExpandArraySliceExpression(const char* expression_cstr, return 1; } } - 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 + else if (root_compiler_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(eTypeIsScalar)) + pointee_compiler_type_info.Test(eTypeIsScalar)) { Error error; root = root->Dereference(error); @@ -3805,14 +3805,14 @@ ValueObject::AddressOf (Error &error) case eAddressTypeFile: case eAddressTypeLoad: { - CompilerType clang_type = GetCompilerType(); - if (clang_type) + CompilerType compiler_type = GetCompilerType(); + if (compiler_type) { std::string name (1, '&'); name.append (m_name.AsCString("")); ExecutionContext exe_ctx (GetExecutionContextRef()); m_addr_of_valobj_sp = ValueObjectConstResult::Create (exe_ctx.GetBestExecutionContextScope(), - clang_type.GetPointerType(), + compiler_type.GetPointerType(), ConstString (name.c_str()), addr, eAddressTypeInvalid, @@ -3835,13 +3835,13 @@ ValueObject::AddressOf (Error &error) } ValueObjectSP -ValueObject::Cast (const CompilerType &clang_ast_type) +ValueObject::Cast (const CompilerType &compiler_type) { - return ValueObjectCast::Create (*this, GetName(), clang_ast_type); + return ValueObjectCast::Create (*this, GetName(), compiler_type); } ValueObjectSP -ValueObject::CastPointerType (const char *name, CompilerType &clang_ast_type) +ValueObject::CastPointerType (const char *name, CompilerType &compiler_type) { ValueObjectSP valobj_sp; AddressType address_type; @@ -3854,7 +3854,7 @@ ValueObject::CastPointerType (const char *name, CompilerType &clang_ast_type) valobj_sp = ValueObjectMemory::Create (exe_ctx.GetBestExecutionContextScope(), name, ptr_addr, - clang_ast_type); + compiler_type); } return valobj_sp; } diff --git a/lldb/source/Core/ValueObjectCast.cpp b/lldb/source/Core/ValueObjectCast.cpp index c8e0fc63754..c05d0395d96 100644 --- a/lldb/source/Core/ValueObjectCast.cpp +++ b/lldb/source/Core/ValueObjectCast.cpp @@ -97,9 +97,9 @@ ValueObjectCast::UpdateValue () Value old_value(m_value); m_update_point.SetUpdated(); m_value = m_parent->GetValue(); - CompilerType clang_type (GetCompilerType()); - //m_value.SetContext (Value::eContextTypeClangType, clang_type); - m_value.SetCompilerType (clang_type); + CompilerType compiler_type (GetCompilerType()); + //m_value.SetContext (Value::eContextTypeClangType, compiler_type); + m_value.SetCompilerType (compiler_type); SetAddressTypeOfChildren(m_parent->GetAddressTypeOfChildren()); if (!CanProvideValue()) { diff --git a/lldb/source/Core/ValueObjectChild.cpp b/lldb/source/Core/ValueObjectChild.cpp index 8e8eb2d7a88..7e95da6a5e9 100644 --- a/lldb/source/Core/ValueObjectChild.cpp +++ b/lldb/source/Core/ValueObjectChild.cpp @@ -27,7 +27,7 @@ using namespace lldb_private; ValueObjectChild::ValueObjectChild ( ValueObject &parent, - const CompilerType &clang_type, + const CompilerType &compiler_type, const ConstString &name, uint64_t byte_size, int32_t byte_offset, @@ -38,7 +38,7 @@ ValueObjectChild::ValueObjectChild AddressType child_ptr_or_ref_addr_type ) : ValueObject (parent), - m_clang_type (clang_type), + m_compiler_type (compiler_type), m_byte_size (byte_size), m_byte_offset (byte_offset), m_bitfield_bit_size (bitfield_bit_size), @@ -73,11 +73,11 @@ AdjustForBitfieldness(ConstString& name, { if (name && bitfield_bit_size) { - const char *clang_type_name = name.AsCString(); - if (clang_type_name) + const char *compiler_type_name = name.AsCString(); + if (compiler_type_name) { - std::vector<char> bitfield_type_name (strlen(clang_type_name) + 32, 0); - ::snprintf (&bitfield_type_name.front(), bitfield_type_name.size(), "%s:%u", clang_type_name, bitfield_bit_size); + std::vector<char> bitfield_type_name (strlen(compiler_type_name) + 32, 0); + ::snprintf (&bitfield_type_name.front(), bitfield_type_name.size(), "%s:%u", compiler_type_name, bitfield_bit_size); name.SetCString(&bitfield_type_name.front()); } } diff --git a/lldb/source/Core/ValueObjectConstResult.cpp b/lldb/source/Core/ValueObjectConstResult.cpp index cb11e727021..11925256708 100644 --- a/lldb/source/Core/ValueObjectConstResult.cpp +++ b/lldb/source/Core/ValueObjectConstResult.cpp @@ -61,21 +61,21 @@ ValueObjectSP ValueObjectConstResult::Create ( ExecutionContextScope *exe_scope, - const CompilerType &clang_type, + const CompilerType &compiler_type, const ConstString &name, const DataExtractor &data, lldb::addr_t address ) { return (new ValueObjectConstResult (exe_scope, - clang_type, + compiler_type, name, data, address))->GetSP(); } ValueObjectConstResult::ValueObjectConstResult (ExecutionContextScope *exe_scope, - const CompilerType &clang_type, + const CompilerType &compiler_type, const ConstString &name, const DataExtractor &data, lldb::addr_t address) : @@ -94,7 +94,7 @@ ValueObjectConstResult::ValueObjectConstResult (ExecutionContextScope *exe_scope m_value.GetScalar() = (uintptr_t)m_data.GetDataStart(); m_value.SetValueType(Value::eValueTypeHostAddress); - m_value.SetCompilerType(clang_type); + m_value.SetCompilerType(compiler_type); m_name = name; SetIsConstant (); SetValueIsValid(true); @@ -103,7 +103,7 @@ ValueObjectConstResult::ValueObjectConstResult (ExecutionContextScope *exe_scope ValueObjectSP ValueObjectConstResult::Create (ExecutionContextScope *exe_scope, - const CompilerType &clang_type, + const CompilerType &compiler_type, const ConstString &name, const lldb::DataBufferSP &data_sp, lldb::ByteOrder data_byte_order, @@ -111,7 +111,7 @@ ValueObjectConstResult::Create (ExecutionContextScope *exe_scope, lldb::addr_t address) { return (new ValueObjectConstResult (exe_scope, - clang_type, + compiler_type, name, data_sp, data_byte_order, @@ -129,7 +129,7 @@ ValueObjectConstResult::Create (ExecutionContextScope *exe_scope, } ValueObjectConstResult::ValueObjectConstResult (ExecutionContextScope *exe_scope, - const CompilerType &clang_type, + const CompilerType &compiler_type, const ConstString &name, const lldb::DataBufferSP &data_sp, lldb::ByteOrder data_byte_order, @@ -145,8 +145,8 @@ ValueObjectConstResult::ValueObjectConstResult (ExecutionContextScope *exe_scope m_data.SetData(data_sp); m_value.GetScalar() = (uintptr_t)data_sp->GetBytes(); m_value.SetValueType(Value::eValueTypeHostAddress); - //m_value.SetContext(Value::eContextTypeClangType, clang_type); - m_value.SetCompilerType (clang_type); + //m_value.SetContext(Value::eContextTypeClangType, compiler_type); + m_value.SetCompilerType (compiler_type); m_name = name; SetIsConstant (); SetValueIsValid(true); @@ -155,14 +155,14 @@ ValueObjectConstResult::ValueObjectConstResult (ExecutionContextScope *exe_scope ValueObjectSP ValueObjectConstResult::Create (ExecutionContextScope *exe_scope, - const CompilerType &clang_type, + const CompilerType &compiler_type, const ConstString &name, lldb::addr_t address, AddressType address_type, uint32_t addr_byte_size) { return (new ValueObjectConstResult (exe_scope, - clang_type, + compiler_type, name, address, address_type, @@ -170,7 +170,7 @@ ValueObjectConstResult::Create (ExecutionContextScope *exe_scope, } ValueObjectConstResult::ValueObjectConstResult (ExecutionContextScope *exe_scope, - const CompilerType &clang_type, + const CompilerType &compiler_type, const ConstString &name, lldb::addr_t address, AddressType address_type, @@ -191,8 +191,8 @@ ValueObjectConstResult::ValueObjectConstResult (ExecutionContextScope *exe_scope case eAddressTypeLoad: m_value.SetValueType(Value::eValueTypeLoadAddress); break; case eAddressTypeHost: m_value.SetValueType(Value::eValueTypeHostAddress); break; } -// m_value.SetContext(Value::eContextTypeClangType, clang_type); - m_value.SetCompilerType (clang_type); +// m_value.SetContext(Value::eContextTypeClangType, compiler_type); + m_value.SetCompilerType (compiler_type); m_name = name; SetIsConstant (); SetValueIsValid(true); @@ -366,9 +366,9 @@ ValueObjectConstResult::GetDynamicValue (lldb::DynamicValueType use_dynamic) } lldb::ValueObjectSP -ValueObjectConstResult::Cast (const CompilerType &clang_ast_type) +ValueObjectConstResult::Cast (const CompilerType &compiler_type) { - return m_impl.Cast(clang_ast_type); + return m_impl.Cast(compiler_type); } lldb::LanguageType diff --git a/lldb/source/Core/ValueObjectConstResultCast.cpp b/lldb/source/Core/ValueObjectConstResultCast.cpp index 0c61cd1955c..8f0c0f1522f 100644 --- a/lldb/source/Core/ValueObjectConstResultCast.cpp +++ b/lldb/source/Core/ValueObjectConstResultCast.cpp @@ -69,7 +69,7 @@ ValueObjectConstResultCast::GetPointeeData (DataExtractor& data, } lldb::ValueObjectSP -ValueObjectConstResultCast::Cast (const CompilerType &clang_ast_type) +ValueObjectConstResultCast::Cast (const CompilerType &compiler_type) { - return m_impl.Cast(clang_ast_type); + return m_impl.Cast(compiler_type); } diff --git a/lldb/source/Core/ValueObjectConstResultChild.cpp b/lldb/source/Core/ValueObjectConstResultChild.cpp index ca06cc6a9c4..002063e6b58 100644 --- a/lldb/source/Core/ValueObjectConstResultChild.cpp +++ b/lldb/source/Core/ValueObjectConstResultChild.cpp @@ -19,7 +19,7 @@ using namespace lldb_private; ValueObjectConstResultChild::ValueObjectConstResultChild ( ValueObject &parent, - const CompilerType &clang_type, + const CompilerType &compiler_type, const ConstString &name, uint32_t byte_size, int32_t byte_offset, @@ -30,7 +30,7 @@ ValueObjectConstResultChild::ValueObjectConstResultChild lldb::addr_t live_address ) : ValueObjectChild (parent, - clang_type, + compiler_type, name, byte_size, byte_offset, @@ -81,7 +81,7 @@ ValueObjectConstResultChild::GetPointeeData (DataExtractor& data, } lldb::ValueObjectSP -ValueObjectConstResultChild::Cast (const CompilerType &clang_ast_type) +ValueObjectConstResultChild::Cast (const CompilerType &compiler_type) { - return m_impl.Cast(clang_ast_type); + return m_impl.Cast(compiler_type); } diff --git a/lldb/source/Core/ValueObjectConstResultImpl.cpp b/lldb/source/Core/ValueObjectConstResultImpl.cpp index 531b0f85cc9..248d7175532 100644 --- a/lldb/source/Core/ValueObjectConstResultImpl.cpp +++ b/lldb/source/Core/ValueObjectConstResultImpl.cpp @@ -71,24 +71,24 @@ ValueObjectConstResultImpl::CreateChildAtIndex (size_t idx, bool synthetic_array bool child_is_deref_of_parent = false; const bool transparent_pointers = synthetic_array_member == false; - CompilerType clang_type = m_impl_backend->GetCompilerType(); + CompilerType compiler_type = m_impl_backend->GetCompilerType(); CompilerType child_compiler_type; ExecutionContext exe_ctx (m_impl_backend->GetExecutionContextRef()); - child_compiler_type = clang_type.GetChildCompilerTypeAtIndex (&exe_ctx, - idx, - transparent_pointers, - omit_empty_base_classes, - ignore_array_bounds, - child_name_str, - child_byte_size, - child_byte_offset, - child_bitfield_bit_size, - child_bitfield_bit_offset, - child_is_base_class, - child_is_deref_of_parent, - m_impl_backend); + child_compiler_type = compiler_type.GetChildCompilerTypeAtIndex (&exe_ctx, + idx, + transparent_pointers, + omit_empty_base_classes, + ignore_array_bounds, + child_name_str, + child_byte_size, + child_byte_offset, + child_bitfield_bit_size, + child_bitfield_bit_offset, + child_is_base_class, + child_is_deref_of_parent, + m_impl_backend); if (child_compiler_type && child_byte_size) { if (synthetic_index) @@ -132,7 +132,7 @@ ValueObjectConstResultImpl::AddressOf (Error &error) return lldb::ValueObjectSP(); if (m_live_address != LLDB_INVALID_ADDRESS) { - CompilerType clang_type(m_impl_backend->GetCompilerType()); + CompilerType compiler_type(m_impl_backend->GetCompilerType()); lldb::DataBufferSP buffer(new lldb_private::DataBufferHeap(&m_live_address,sizeof(lldb::addr_t))); @@ -140,7 +140,7 @@ ValueObjectConstResultImpl::AddressOf (Error &error) new_name.append(m_impl_backend->GetName().AsCString("")); ExecutionContext exe_ctx (m_impl_backend->GetExecutionContextRef()); m_address_of_backend = ValueObjectConstResult::Create (exe_ctx.GetBestExecutionContextScope(), - clang_type.GetPointerType(), + compiler_type.GetPointerType(), ConstString(new_name.c_str()), buffer, lldb::endian::InlHostByteOrder(), @@ -156,13 +156,13 @@ ValueObjectConstResultImpl::AddressOf (Error &error) } lldb::ValueObjectSP -ValueObjectConstResultImpl::Cast (const CompilerType &clang_ast_type) +ValueObjectConstResultImpl::Cast (const CompilerType &compiler_type) { if (m_impl_backend == NULL) return lldb::ValueObjectSP(); ValueObjectConstResultCast *result_cast = new ValueObjectConstResultCast( - *m_impl_backend, m_impl_backend->GetName(), clang_ast_type, m_live_address); + *m_impl_backend, m_impl_backend->GetName(), compiler_type, m_live_address); return result_cast->GetSP(); } diff --git a/lldb/source/Core/ValueObjectMemory.cpp b/lldb/source/Core/ValueObjectMemory.cpp index 2ad3aa07256..fa483516d8e 100644 --- a/lldb/source/Core/ValueObjectMemory.cpp +++ b/lldb/source/Core/ValueObjectMemory.cpp @@ -58,7 +58,7 @@ ValueObjectMemory::ValueObjectMemory (ExecutionContextScope *exe_scope, ValueObject(exe_scope), m_address (address), m_type_sp(type_sp), - m_clang_type() + m_compiler_type() { // Do not attempt to construct one of these objects with no variable! assert (m_type_sp.get() != NULL); @@ -94,17 +94,17 @@ ValueObjectMemory::ValueObjectMemory (ExecutionContextScope *exe_scope, ValueObject(exe_scope), m_address (address), m_type_sp(), - m_clang_type(ast_type) + m_compiler_type(ast_type) { // Do not attempt to construct one of these objects with no variable! - assert (m_clang_type.GetTypeSystem()); - assert (m_clang_type.GetOpaqueQualType()); + assert (m_compiler_type.GetTypeSystem()); + assert (m_compiler_type.GetOpaqueQualType()); TargetSP target_sp (GetTargetSP()); SetName (ConstString(name)); -// m_value.SetContext(Value::eContextTypeClangType, m_clang_type.GetOpaqueQualType()); - m_value.SetCompilerType(m_clang_type); +// m_value.SetContext(Value::eContextTypeClangType, m_compiler_type.GetOpaqueQualType()); + m_value.SetCompilerType(m_compiler_type); lldb::addr_t load_address = m_address.GetLoadAddress (target_sp.get()); if (load_address != LLDB_INVALID_ADDRESS) { @@ -136,7 +136,7 @@ ValueObjectMemory::GetCompilerTypeImpl () { if (m_type_sp) return m_type_sp->GetForwardCompilerType (); - return m_clang_type; + return m_compiler_type; } ConstString @@ -144,7 +144,7 @@ ValueObjectMemory::GetTypeName() { if (m_type_sp) return m_type_sp->GetName(); - return m_clang_type.GetConstTypeName(); + return m_compiler_type.GetConstTypeName(); } ConstString @@ -152,7 +152,7 @@ ValueObjectMemory::GetDisplayTypeName() { if (m_type_sp) return m_type_sp->GetForwardCompilerType ().GetDisplayTypeName(); - return m_clang_type.GetDisplayTypeName(); + return m_compiler_type.GetDisplayTypeName(); } size_t @@ -161,7 +161,7 @@ ValueObjectMemory::CalculateNumChildren() if (m_type_sp) return m_type_sp->GetNumChildren(true); const bool omit_empty_base_classes = true; - return m_clang_type.GetNumChildren (omit_empty_base_classes); + return m_compiler_type.GetNumChildren (omit_empty_base_classes); } uint64_t @@ -169,7 +169,7 @@ ValueObjectMemory::GetByteSize() { if (m_type_sp) return m_type_sp->GetByteSize(); - return m_clang_type.GetByteSize (nullptr); + return m_compiler_type.GetByteSize (nullptr); } lldb::ValueType @@ -249,8 +249,8 @@ ValueObjectMemory::UpdateValue () value.SetContext(Value::eContextTypeLLDBType, m_type_sp.get()); else { - //value.SetContext(Value::eContextTypeClangType, m_clang_type.GetOpaqueQualType()); - value.SetCompilerType(m_clang_type); + //value.SetContext(Value::eContextTypeClangType, m_compiler_type.GetOpaqueQualType()); + value.SetCompilerType(m_compiler_type); } m_error = value.GetValueAsData(&exe_ctx, m_data, 0, GetModule().get()); diff --git a/lldb/source/Core/ValueObjectRegister.cpp b/lldb/source/Core/ValueObjectRegister.cpp index a0d87ec64a1..1e8a4156a61 100644 --- a/lldb/source/Core/ValueObjectRegister.cpp +++ b/lldb/source/Core/ValueObjectRegister.cpp @@ -279,7 +279,7 @@ ValueObjectRegister::ValueObjectRegister (ValueObject &parent, lldb::RegisterCon m_reg_info (), m_reg_value (), m_type_name (), - m_clang_type () + m_compiler_type () { assert (reg_ctx_sp.get()); ConstructObject(reg_num); @@ -297,7 +297,7 @@ ValueObjectRegister::ValueObjectRegister (ExecutionContextScope *exe_scope, lldb m_reg_info (), m_reg_value (), m_type_name (), - m_clang_type () + m_compiler_type () { assert (reg_ctx); ConstructObject(reg_num); @@ -310,7 +310,7 @@ ValueObjectRegister::~ValueObjectRegister() CompilerType ValueObjectRegister::GetCompilerTypeImpl () { - if (!m_clang_type.IsValid()) + if (!m_compiler_type.IsValid()) { ExecutionContext exe_ctx (GetExecutionContextRef()); Target *target = exe_ctx.GetTargetPtr(); @@ -321,12 +321,12 @@ ValueObjectRegister::GetCompilerTypeImpl () { TypeSystem *type_system = exe_module->GetTypeSystemForLanguage (eLanguageTypeC); if (type_system) - m_clang_type = type_system->GetBuiltinTypeForEncodingAndBitSize (m_reg_info.encoding, + m_compiler_type = type_system->GetBuiltinTypeForEncodingAndBitSize (m_reg_info.encoding, m_reg_info.byte_size * 8); } } } - return m_clang_type; + return m_compiler_type; } ConstString diff --git a/lldb/source/Core/ValueObjectVariable.cpp b/lldb/source/Core/ValueObjectVariable.cpp index 2d97bf2b556..72107400bfc 100644 --- a/lldb/source/Core/ValueObjectVariable.cpp +++ b/lldb/source/Core/ValueObjectVariable.cpp @@ -168,15 +168,15 @@ ValueObjectVariable::UpdateValue () m_resolved_value = m_value; m_value.SetContext(Value::eContextTypeVariable, variable); - CompilerType clang_type = GetCompilerType(); - if (clang_type.IsValid()) - m_value.SetCompilerType(clang_type); + CompilerType compiler_type = GetCompilerType(); + if (compiler_type.IsValid()) + m_value.SetCompilerType(compiler_type); Value::ValueType value_type = m_value.GetValueType(); Process *process = exe_ctx.GetProcessPtr(); const bool process_is_alive = process && process->IsAlive(); - const uint32_t type_info = clang_type.GetTypeInfo(); + const uint32_t type_info = compiler_type.GetTypeInfo(); const bool is_pointer_or_ref = (type_info & (lldb::eTypeIsPointer | lldb::eTypeIsReference)) != 0; switch (value_type) |