diff options
author | Greg Clayton <gclayton@apple.com> | 2010-07-21 22:12:05 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2010-07-21 22:12:05 +0000 |
commit | e1a916a74de2d2d86835a99e1eb11a9538f07778 (patch) | |
tree | c573d1a9e96c118e9060231603d250377644e7cd /lldb/source/Expression/ClangExpressionDeclMap.cpp | |
parent | a57b97e7e7d4bd44ebc90c743e6db318fa5348d6 (diff) | |
download | bcm5719-llvm-e1a916a74de2d2d86835a99e1eb11a9538f07778.tar.gz bcm5719-llvm-e1a916a74de2d2d86835a99e1eb11a9538f07778.zip |
Change over to using the definitions for mach-o types and defines to the
defines that are in "llvm/Support/MachO.h". This should allow ObjectFileMachO
and ObjectContainerUniversalMachO to be able to be cross compiled in Linux.
Also did some cleanup on the ASTType by renaming it to ClangASTType and
renaming the header file. Moved a lot of "AST * + opaque clang type *"
functionality from lldb_private::Type over into ClangASTType.
llvm-svn: 109046
Diffstat (limited to 'lldb/source/Expression/ClangExpressionDeclMap.cpp')
-rw-r--r-- | lldb/source/Expression/ClangExpressionDeclMap.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/lldb/source/Expression/ClangExpressionDeclMap.cpp b/lldb/source/Expression/ClangExpressionDeclMap.cpp index 5a6b6740750..54bfad5772a 100644 --- a/lldb/source/Expression/ClangExpressionDeclMap.cpp +++ b/lldb/source/Expression/ClangExpressionDeclMap.cpp @@ -292,10 +292,11 @@ ClangExpressionDeclMap::DoMaterialize (bool dematerialize, TypeFromUser copied_type(ClangASTContext::CopyType(context, iter->m_parser_type.GetASTContext(), - iter->m_parser_type.GetType()), + iter->m_parser_type.GetOpaqueQualType()), context); - result_value->SetContext(Value::eContextTypeOpaqueClangQualType, copied_type.GetType()); + result_value->SetContext(Value::eContextTypeOpaqueClangQualType, + copied_type.GetOpaqueQualType()); } continue; @@ -329,7 +330,10 @@ ClangExpressionDeclMap::DoMaterializeOneVariable(bool dematerialize, return false; } - log->Printf("%s %s with type %p", (dematerialize ? "Dematerializing" : "Materializing"), name, type.GetType()); + log->Printf("%s %s with type %p", + (dematerialize ? "Dematerializing" : "Materializing"), + name, + type.GetOpaqueQualType()); std::auto_ptr<lldb_private::Value> location_value(GetVariableValue(exe_ctx, var, @@ -345,7 +349,8 @@ ClangExpressionDeclMap::DoMaterializeOneVariable(bool dematerialize, { lldb::addr_t value_addr = location_value->GetScalar().ULongLong(); - size_t bit_size = ClangASTContext::GetTypeBitSize(type.GetASTContext(), type.GetType()); + size_t bit_size = ClangASTContext::GetTypeBitSize (type.GetASTContext(), + type.GetOpaqueQualType()); size_t byte_size = bit_size % 8 ? ((bit_size + 8) / 8) : (bit_size / 8); DataBufferHeap data; @@ -488,7 +493,9 @@ ClangExpressionDeclMap::FindVariableInScope(const SymbolContext &sym_ctx, if (type->GetASTContext() == var->GetType()->GetClangAST()) { - if (!ClangASTContext::AreTypesSame(type->GetASTContext(), type->GetType(), var->GetType()->GetOpaqueClangQualType())) + if (!ClangASTContext::AreTypesSame(type->GetASTContext(), + type->GetOpaqueQualType(), + var->GetType()->GetOpaqueClangQualType())) return NULL; } else @@ -657,7 +664,7 @@ ClangExpressionDeclMap::AddOneVariable(NameSearchContext &context, &ut, &pt); - NamedDecl *var_decl = context.AddVarDecl(pt.GetType()); + NamedDecl *var_decl = context.AddVarDecl(pt.GetOpaqueQualType()); Tuple tuple; |