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
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
index fd7fc50..3cbdc79 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -528,7 +528,7 @@
size_t
AppleObjCRuntimeV2::GetByteOffsetForIvar (ClangASTType &parent_ast_type, const char *ivar_name)
{
- const char *class_name = parent_ast_type.GetClangTypeName().AsCString();
+ const char *class_name = parent_ast_type.GetConstTypeName().AsCString();
if (!class_name || *class_name == '\0' || !ivar_name || *ivar_name == '\0')
return LLDB_INVALID_IVAR_OFFSET;
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 9a7e7fd..7740d6f 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -1493,7 +1493,7 @@
if (class_language == eLanguageTypeObjC)
{
- std::string class_str (ClangASTContext::GetTypeName (clang_type));
+ std::string class_str (ClangASTType::GetTypeNameForOpaqueQualType(clang_type));
if (!class_str.empty())
{