summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-06-30 02:28:26 +0000
committerGreg Clayton <gclayton@apple.com>2011-06-30 02:28:26 +0000
commite305594277de342f49b92fb5e4849b3fc13a8de0 (patch)
tree131c85af82155042afe56cf519221a39fe2314f3 /lldb/source/Core
parentcfe3b14d7787f5d563d28266a7f04c3d18311105 (diff)
downloadbcm5719-llvm-e305594277de342f49b92fb5e4849b3fc13a8de0.tar.gz
bcm5719-llvm-e305594277de342f49b92fb5e4849b3fc13a8de0.zip
Centralize all of the type name code so that we always strip the leading
"struct ", "class ", and "union " from the start of any type names that are extracted from clang QualType objects. I had to fix test suite cases that were expecting the struct/union/class prefix to be there. llvm-svn: 134132
Diffstat (limited to 'lldb/source/Core')
-rw-r--r--lldb/source/Core/ValueObjectChild.cpp2
-rw-r--r--lldb/source/Core/ValueObjectConstResult.cpp2
-rw-r--r--lldb/source/Core/ValueObjectDynamicValue.cpp2
-rw-r--r--lldb/source/Core/ValueObjectMemory.cpp6
-rw-r--r--lldb/source/Core/ValueObjectRegister.cpp2
5 files changed, 5 insertions, 9 deletions
diff --git a/lldb/source/Core/ValueObjectChild.cpp b/lldb/source/Core/ValueObjectChild.cpp
index 509852f4b3a..dcbb90a99ea 100644
--- a/lldb/source/Core/ValueObjectChild.cpp
+++ b/lldb/source/Core/ValueObjectChild.cpp
@@ -71,7 +71,7 @@ ValueObjectChild::GetTypeName()
{
if (m_type_name.IsEmpty())
{
- m_type_name = ClangASTType::GetClangTypeName (GetClangType());
+ m_type_name = ClangASTType::GetConstTypeName (GetClangType());
if (m_type_name)
{
if (m_bitfield_bit_size > 0)
diff --git a/lldb/source/Core/ValueObjectConstResult.cpp b/lldb/source/Core/ValueObjectConstResult.cpp
index fbb35eb42aa..7ceddc99607 100644
--- a/lldb/source/Core/ValueObjectConstResult.cpp
+++ b/lldb/source/Core/ValueObjectConstResult.cpp
@@ -273,7 +273,7 @@ ConstString
ValueObjectConstResult::GetTypeName()
{
if (m_type_name.IsEmpty())
- m_type_name = ClangASTType::GetClangTypeName (GetClangType());
+ m_type_name = ClangASTType::GetConstTypeName (GetClangType());
return m_type_name;
}
diff --git a/lldb/source/Core/ValueObjectDynamicValue.cpp b/lldb/source/Core/ValueObjectDynamicValue.cpp
index 0188ad2099f..0a90b85bfdd 100644
--- a/lldb/source/Core/ValueObjectDynamicValue.cpp
+++ b/lldb/source/Core/ValueObjectDynamicValue.cpp
@@ -62,7 +62,7 @@ ValueObjectDynamicValue::GetTypeName()
{
const bool success = UpdateValueIfNeeded();
if (success && m_type_sp)
- return ClangASTType::GetClangTypeName (GetClangType());
+ return ClangASTType::GetConstTypeName (GetClangType());
else
return m_parent->GetTypeName();
}
diff --git a/lldb/source/Core/ValueObjectMemory.cpp b/lldb/source/Core/ValueObjectMemory.cpp
index ad8c8f011da..900d27fbb1a 100644
--- a/lldb/source/Core/ValueObjectMemory.cpp
+++ b/lldb/source/Core/ValueObjectMemory.cpp
@@ -140,11 +140,7 @@ ValueObjectMemory::GetTypeName()
{
if (m_type_sp)
return m_type_sp->GetName();
- ConstString name;
- std::string type_name (ClangASTContext::GetTypeName (m_clang_type.GetOpaqueQualType()));
- if (!type_name.empty())
- name.SetCString (type_name.c_str());
- return name;
+ return ClangASTType::GetConstTypeName (m_clang_type.GetOpaqueQualType());
}
uint32_t
diff --git a/lldb/source/Core/ValueObjectRegister.cpp b/lldb/source/Core/ValueObjectRegister.cpp
index bcefc3064d7..db3d559efa3 100644
--- a/lldb/source/Core/ValueObjectRegister.cpp
+++ b/lldb/source/Core/ValueObjectRegister.cpp
@@ -322,7 +322,7 @@ ConstString
ValueObjectRegister::GetTypeName()
{
if (m_type_name.IsEmpty())
- m_type_name = ClangASTType::GetClangTypeName (GetClangType());
+ m_type_name = ClangASTType::GetConstTypeName (GetClangType());
return m_type_name;
}
OpenPOWER on IntegriCloud