summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2010-07-21 22:12:05 +0000
committerGreg Clayton <gclayton@apple.com>2010-07-21 22:12:05 +0000
commite1a916a74de2d2d86835a99e1eb11a9538f07778 (patch)
treec573d1a9e96c118e9060231603d250377644e7cd /lldb/source/Core
parenta57b97e7e7d4bd44ebc90c743e6db318fa5348d6 (diff)
downloadbcm5719-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/Core')
-rw-r--r--lldb/source/Core/Value.cpp7
-rw-r--r--lldb/source/Core/ValueObject.cpp23
-rw-r--r--lldb/source/Core/ValueObjectChild.cpp3
-rw-r--r--lldb/source/Core/ValueObjectRegister.cpp3
4 files changed, 20 insertions, 16 deletions
diff --git a/lldb/source/Core/Value.cpp b/lldb/source/Core/Value.cpp
index 32c27496b8f..2399059b730 100644
--- a/lldb/source/Core/Value.cpp
+++ b/lldb/source/Core/Value.cpp
@@ -17,6 +17,7 @@
#include "lldb/Core/DataBufferHeap.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/Stream.h"
+#include "lldb/Symbol/ClangASTType.h"
#include "lldb/Symbol/ClangASTContext.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Symbol/SymbolContext.h"
@@ -472,7 +473,7 @@ Value::GetValueDefaultFormat ()
break;
case eContextTypeOpaqueClangQualType:
- return Type::GetFormat (m_context);
+ return ClangASTType::GetFormat (m_context);
case eContextTypeDCRegisterInfo:
if (GetRegisterInfo())
@@ -692,9 +693,9 @@ Value::ResolveValue(ExecutionContext *exe_ctx, clang::ASTContext *ast_context)
lldb::AddressType address_type = m_value_type == eValueTypeLoadAddress ? eAddressTypeLoad : eAddressTypeHost;
lldb::addr_t addr = m_value.ULongLong(LLDB_INVALID_ADDRESS);
DataExtractor data;
- if (Type::ReadFromMemory (exe_ctx, ast_context, opaque_clang_qual_type, addr, address_type, data))
+ if (ClangASTType::ReadFromMemory (ast_context, opaque_clang_qual_type, exe_ctx, addr, address_type, data))
{
- if (Type::GetValueAsScalar (ast_context, opaque_clang_qual_type, data, 0, data.GetByteSize(), scalar))
+ if (ClangASTType::GetValueAsScalar (ast_context, opaque_clang_qual_type, data, 0, data.GetByteSize(), scalar))
{
m_value = scalar;
m_value_type = eValueTypeScalar;
diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp
index 72984c6c082..065b18d0553 100644
--- a/lldb/source/Core/ValueObject.cpp
+++ b/lldb/source/Core/ValueObject.cpp
@@ -20,6 +20,7 @@
#include "lldb/Core/ValueObjectChild.h"
#include "lldb/Core/ValueObjectList.h"
+#include "lldb/Symbol/ClangASTType.h"
#include "lldb/Symbol/ClangASTContext.h"
#include "lldb/Symbol/Type.h"
@@ -488,16 +489,16 @@ ValueObject::GetValueAsCString (ExecutionContextScope *exe_scope)
if (clang_type)
{
StreamString sstr;
- lldb::Format format = Type::GetFormat(clang_type);
- if (Type::DumpTypeValue(&sstr,
- GetClangAST(), // The clang AST
- clang_type, // The clang type to display
- format, // Format to display this type with
- m_data, // Data to extract from
- 0, // Byte offset into "m_data"
- GetByteSize(), // Byte size of item in "m_data"
- GetBitfieldBitSize(), // Bitfield bit size
- GetBitfieldBitOffset())) // Bitfield bit offset
+ lldb::Format format = ClangASTType::GetFormat(clang_type);
+ if (ClangASTType::DumpTypeValue(GetClangAST(), // The clang AST
+ clang_type, // The clang type to display
+ &sstr,
+ format, // Format to display this type with
+ m_data, // Data to extract from
+ 0, // Byte offset into "m_data"
+ GetByteSize(), // Byte size of item in "m_data"
+ GetBitfieldBitSize(), // Bitfield bit size
+ GetBitfieldBitOffset())) // Bitfield bit offset
m_value_str.swap(sstr.GetString());
else
m_value_str.clear();
@@ -537,7 +538,7 @@ ValueObject::SetValueFromCString (ExecutionContextScope *exe_scope, const char *
return false;
uint32_t count = 0;
- lldb::Encoding encoding = Type::GetEncoding (GetOpaqueClangQualType(), count);
+ lldb::Encoding encoding = ClangASTType::GetEncoding (GetOpaqueClangQualType(), count);
char *end = NULL;
const size_t byte_size = GetByteSize();
diff --git a/lldb/source/Core/ValueObjectChild.cpp b/lldb/source/Core/ValueObjectChild.cpp
index 9b9b8d9e849..3093582998c 100644
--- a/lldb/source/Core/ValueObjectChild.cpp
+++ b/lldb/source/Core/ValueObjectChild.cpp
@@ -12,6 +12,7 @@
#include "lldb/Core/Module.h"
#include "lldb/Core/ValueObjectList.h"
+#include "lldb/Symbol/ClangASTType.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Symbol/SymbolContext.h"
#include "lldb/Symbol/Type.h"
@@ -103,7 +104,7 @@ ValueObjectChild::GetTypeName()
{
if (m_type_name.IsEmpty())
{
- m_type_name = Type::GetClangTypeName (GetOpaqueClangQualType());
+ m_type_name = ClangASTType::GetClangTypeName (GetOpaqueClangQualType());
if (m_type_name)
{
if (m_bitfield_bit_size > 0)
diff --git a/lldb/source/Core/ValueObjectRegister.cpp b/lldb/source/Core/ValueObjectRegister.cpp
index aae818eadd6..5d5215fe83d 100644
--- a/lldb/source/Core/ValueObjectRegister.cpp
+++ b/lldb/source/Core/ValueObjectRegister.cpp
@@ -15,6 +15,7 @@
// Other libraries and framework includes
// Project includes
#include "lldb/Core/Module.h"
+#include "lldb/Symbol/ClangASTType.h"
#include "lldb/Symbol/ClangASTContext.h"
#include "lldb/Symbol/TypeList.h"
#include "lldb/Target/ExecutionContext.h"
@@ -250,7 +251,7 @@ ConstString
ValueObjectRegister::GetTypeName()
{
if (m_type_name.IsEmpty())
- m_type_name = Type::GetClangTypeName (GetOpaqueClangQualType());
+ m_type_name = ClangASTType::GetClangTypeName (GetOpaqueClangQualType());
return m_type_name;
}
OpenPOWER on IntegriCloud