diff options
Diffstat (limited to 'lldb/source/Target')
-rw-r--r-- | lldb/source/Target/ObjCLanguageRuntime.cpp | 4 | ||||
-rw-r--r-- | lldb/source/Target/StackFrame.cpp | 26 | ||||
-rw-r--r-- | lldb/source/Target/Thread.cpp | 7 | ||||
-rw-r--r-- | lldb/source/Target/ThreadPlanStepOut.cpp | 11 | ||||
-rw-r--r-- | lldb/source/Target/ThreadPlanTracer.cpp | 6 |
5 files changed, 24 insertions, 30 deletions
diff --git a/lldb/source/Target/ObjCLanguageRuntime.cpp b/lldb/source/Target/ObjCLanguageRuntime.cpp index 1aeb7255bcb..64ddfcc6c79 100644 --- a/lldb/source/Target/ObjCLanguageRuntime.cpp +++ b/lldb/source/Target/ObjCLanguageRuntime.cpp @@ -131,7 +131,7 @@ ObjCLanguageRuntime::LookupInCompleteClassCache (ConstString &name) { TypeSP type_sp (types.GetTypeAtIndex(i)); - if (ClangASTContext::IsObjCClassType(type_sp->GetClangForwardType())) + if (type_sp->GetClangForwardType().IsObjCObjectOrInterfaceType()) { if (type_sp->IsCompleteObjCClass()) { @@ -532,7 +532,7 @@ ObjCLanguageRuntime::GetClassDescriptor (ValueObject& valobj) // if we get an invalid VO (which might still happen when playing around // with pointers returned by the expression parser, don't consider this // a valid ObjC object) - if (valobj.GetValue().GetContextType() != Value::eContextTypeInvalid) + if (valobj.GetClangType().IsValid()) { addr_t isa_pointer = valobj.GetPointerValue(); if (isa_pointer != LLDB_INVALID_ADDRESS) diff --git a/lldb/source/Target/StackFrame.cpp b/lldb/source/Target/StackFrame.cpp index b0293be89b0..3c4c43d9f44 100644 --- a/lldb/source/Target/StackFrame.cpp +++ b/lldb/source/Target/StackFrame.cpp @@ -645,9 +645,9 @@ StackFrame::GetValueForVariableExpressionPath (const char *var_expr_cstr, { // Make sure we aren't trying to deref an objective // C ivar if this is not allowed - const uint32_t pointer_type_flags = ClangASTContext::GetTypeInfo (valobj_sp->GetClangType(), NULL, NULL); - if ((pointer_type_flags & ClangASTContext::eTypeIsObjC) && - (pointer_type_flags & ClangASTContext::eTypeIsPointer)) + const uint32_t pointer_type_flags = valobj_sp->GetClangType().GetTypeInfo (NULL); + if ((pointer_type_flags & ClangASTType::eTypeIsObjC) && + (pointer_type_flags & ClangASTType::eTypeIsPointer)) { // This was an objective C object pointer and // it was requested we skip any fragile ivars @@ -759,7 +759,7 @@ StackFrame::GetValueForVariableExpressionPath (const char *var_expr_cstr, if (end && *end == ']' && *(end-1) != '[') // this code forces an error in the case of arr[]. as bitfield[] is not a good syntax we're good to go { - if (ClangASTContext::IsPointerToScalarType(valobj_sp->GetClangType()) && deref) + if (valobj_sp->GetClangType().IsPointerToScalarType() && deref) { // what we have is *ptr[low]. the most similar C++ syntax is to deref ptr // and extract bit low out of it. reading array item low @@ -777,7 +777,7 @@ StackFrame::GetValueForVariableExpressionPath (const char *var_expr_cstr, valobj_sp = temp; deref = false; } - else if (ClangASTContext::IsArrayOfScalarType(valobj_sp->GetClangType()) && deref) + else if (valobj_sp->GetClangType().IsArrayOfScalarType() && deref) { // what we have is *arr[low]. the most similar C++ syntax is to get arr[0] // (an operation that is equivalent to deref-ing arr) @@ -802,9 +802,9 @@ StackFrame::GetValueForVariableExpressionPath (const char *var_expr_cstr, { bool is_objc_pointer = true; - if (ClangASTType::GetMinimumLanguage(valobj_sp->GetClangAST(), valobj_sp->GetClangType()) != eLanguageTypeObjC) + if (valobj_sp->GetClangType().GetMinimumLanguage() != eLanguageTypeObjC) is_objc_pointer = false; - else if (!ClangASTContext::IsPointerType(valobj_sp->GetClangType())) + else if (!valobj_sp->GetClangType().IsPointerType()) is_objc_pointer = false; if (no_synth_child && is_objc_pointer) @@ -861,7 +861,7 @@ StackFrame::GetValueForVariableExpressionPath (const char *var_expr_cstr, } } } - else if (ClangASTContext::IsArrayType (valobj_sp->GetClangType(), NULL, NULL, &is_incomplete_array)) + else if (valobj_sp->GetClangType().IsArrayType (NULL, NULL, &is_incomplete_array)) { // Pass false to dynamic_value here so we can tell the difference between // no dynamic value and no member of this type... @@ -878,7 +878,7 @@ StackFrame::GetValueForVariableExpressionPath (const char *var_expr_cstr, var_expr_path_strm.GetString().c_str()); } } - else if (ClangASTContext::IsScalarType(valobj_sp->GetClangType())) + else if (valobj_sp->GetClangType().IsScalarType()) { // this is a bitfield asking to display just one bit child_valobj_sp = valobj_sp->GetSyntheticBitFieldChild(child_index, child_index, true); @@ -961,7 +961,7 @@ StackFrame::GetValueForVariableExpressionPath (const char *var_expr_cstr, final_index = temp; } - if (ClangASTContext::IsPointerToScalarType(valobj_sp->GetClangType()) && deref) + if (valobj_sp->GetClangType().IsPointerToScalarType() && deref) { // what we have is *ptr[low-high]. the most similar C++ syntax is to deref ptr // and extract bits low thru high out of it. reading array items low thru high @@ -979,7 +979,7 @@ StackFrame::GetValueForVariableExpressionPath (const char *var_expr_cstr, valobj_sp = temp; deref = false; } - else if (ClangASTContext::IsArrayOfScalarType(valobj_sp->GetClangType()) && deref) + else if (valobj_sp->GetClangType().IsArrayOfScalarType() && deref) { // what we have is *arr[low-high]. the most similar C++ syntax is to get arr[0] // (an operation that is equivalent to deref-ing arr) @@ -1122,7 +1122,7 @@ StackFrame::GetFrameBaseValue (Scalar &frame_base, Error *error_ptr) if (m_sc.function->GetFrameBaseExpression().IsLocationList()) loclist_base_addr = m_sc.function->GetAddressRange().GetBaseAddress().GetLoadAddress (exe_ctx.GetTargetPtr()); - if (m_sc.function->GetFrameBaseExpression().Evaluate(&exe_ctx, NULL, NULL, NULL, NULL, loclist_base_addr, NULL, expr_value, &m_frame_base_error) == false) + if (m_sc.function->GetFrameBaseExpression().Evaluate(&exe_ctx, NULL, NULL, NULL, loclist_base_addr, NULL, expr_value, &m_frame_base_error) == false) { // We should really have an error if evaluate returns, but in case // we don't, lets set the error to something at least. @@ -1131,7 +1131,7 @@ StackFrame::GetFrameBaseValue (Scalar &frame_base, Error *error_ptr) } else { - m_frame_base = expr_value.ResolveValue(&exe_ctx, NULL); + m_frame_base = expr_value.ResolveValue(&exe_ctx); } } else diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp index 508238de458..12ec40f6be3 100644 --- a/lldb/source/Target/Thread.cpp +++ b/lldb/source/Target/Thread.cpp @@ -1677,13 +1677,12 @@ Thread::ReturnFromFrame (lldb::StackFrameSP frame_sp, lldb::ValueObjectSP return Type *function_type = sc.function->GetType(); if (function_type) { - clang_type_t return_type = sc.function->GetReturnClangType(); + ClangASTType return_type = sc.function->GetClangType().GetFunctionReturnType(); if (return_type) { - ClangASTType ast_type (function_type->GetClangAST(), return_type); StreamString s; - ast_type.DumpTypeDescription(&s); - ValueObjectSP cast_value_sp = return_value_sp->Cast(ast_type); + return_type.DumpTypeDescription(&s); + ValueObjectSP cast_value_sp = return_value_sp->Cast(return_type); if (cast_value_sp) { cast_value_sp->SetFormat(eFormatHex); diff --git a/lldb/source/Target/ThreadPlanStepOut.cpp b/lldb/source/Target/ThreadPlanStepOut.cpp index 71ccf80428b..ba529587437 100644 --- a/lldb/source/Target/ThreadPlanStepOut.cpp +++ b/lldb/source/Target/ThreadPlanStepOut.cpp @@ -464,17 +464,12 @@ ThreadPlanStepOut::CalculateReturnValue () if (m_immediate_step_from_function != NULL) { - Type *return_type = m_immediate_step_from_function->GetType(); - lldb::clang_type_t return_clang_type = m_immediate_step_from_function->GetReturnClangType(); - if (return_type && return_clang_type) + ClangASTType return_clang_type = m_immediate_step_from_function->GetClangType().GetFunctionReturnType(); + if (return_clang_type) { - ClangASTType ast_type (return_type->GetClangAST(), return_clang_type); - lldb::ABISP abi_sp = m_thread.GetProcess()->GetABI(); if (abi_sp) - { - m_return_valobj_sp = abi_sp->GetReturnValueObject(m_thread, ast_type); - } + m_return_valobj_sp = abi_sp->GetReturnValueObject(m_thread, return_clang_type); } } } diff --git a/lldb/source/Target/ThreadPlanTracer.cpp b/lldb/source/Target/ThreadPlanTracer.cpp index 7242b8e4218..af6cef7ecc5 100644 --- a/lldb/source/Target/ThreadPlanTracer.cpp +++ b/lldb/source/Target/ThreadPlanTracer.cpp @@ -136,8 +136,7 @@ ThreadPlanAssemblyTracer::GetIntPointerType() if (exe_module) { - m_intptr_type = TypeFromUser(exe_module->GetClangASTContext().GetBuiltinTypeForEncodingAndBitSize(eEncodingUint, target_sp->GetArchitecture().GetAddressByteSize() * 8), - exe_module->GetClangASTContext().getASTContext()); + m_intptr_type = TypeFromUser(exe_module->GetClangASTContext().GetBuiltinTypeForEncodingAndBitSize(eEncodingUint, target_sp->GetArchitecture().GetAddressByteSize() * 8)); } } } @@ -243,7 +242,8 @@ ThreadPlanAssemblyTracer::Log () { Value value; value.SetValueType (Value::eValueTypeScalar); - value.SetContext (Value::eContextTypeClangType, intptr_type.GetOpaqueQualType()); +// value.SetContext (Value::eContextTypeClangType, intptr_type.GetOpaqueQualType()); + value.SetClangType (intptr_type); value_list.PushValue (value); } |