summaryrefslogtreecommitdiffstats
path: root/include/lldb/DataFormatters/FormatClasses.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/lldb/DataFormatters/FormatClasses.h')
-rw-r--r--include/lldb/DataFormatters/FormatClasses.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/include/lldb/DataFormatters/FormatClasses.h b/include/lldb/DataFormatters/FormatClasses.h
index 48a8eda..6d9a50e 100644
--- a/include/lldb/DataFormatters/FormatClasses.h
+++ b/include/lldb/DataFormatters/FormatClasses.h
@@ -12,7 +12,6 @@
// C Includes
#include <stdint.h>
-#include <unistd.h>
// C++ Includes
#include <string>
@@ -61,7 +60,7 @@ public:
if (type)
{
m_type.m_type_name.assign(type->GetName().GetCString());
- m_type.m_typeimpl_sp = lldb::TypeImplSP(new TypeImpl(type));
+ m_type.m_type_pair.SetType(type);
}
}
@@ -72,7 +71,7 @@ public:
if (type.IsValid())
{
m_type.m_type_name.assign(type.GetConstTypeName().GetCString());
- m_type.m_typeimpl_sp = lldb::TypeImplSP(new TypeImpl(type));
+ m_type.m_type_pair.SetType(type);
}
}
@@ -87,16 +86,16 @@ public:
lldb::TypeSP
GetTypeSP ()
{
- if (m_type.m_typeimpl_sp && m_type.m_typeimpl_sp->IsValid())
- return m_type.m_typeimpl_sp->GetTypeSP();
+ if (m_type.m_type_pair.IsValid())
+ return m_type.m_type_pair.GetTypeSP();
return lldb::TypeSP();
}
ClangASTType
GetClangASTType ()
{
- if (m_type.m_typeimpl_sp && m_type.m_typeimpl_sp->IsValid())
- return m_type.m_typeimpl_sp->GetClangASTType();
+ if (m_type.m_type_pair.IsValid())
+ return m_type.m_type_pair.GetClangASTType();
return ClangASTType();
}
@@ -109,12 +108,11 @@ public:
private:
bool m_is_regex;
// this works better than TypeAndOrName because the latter only wraps a TypeSP
- // whereas TypeImplSP can also be backed by a ClangASTType which is more commonly
- // used in LLDB. moreover, TypeImplSP is also what is currently backing SBType
+ // whereas TypePair can also be backed by a ClangASTType
struct TypeOrName
{
std::string m_type_name;
- lldb::TypeImplSP m_typeimpl_sp;
+ TypePair m_type_pair;
};
TypeOrName m_type;
OpenPOWER on IntegriCloud