First step in getting LLDB ready to support multiple different type systems.
This is the work done by Ryan Brown from http://reviews.llvm.org/D8712 that makes a TypeSystem class and abstracts types to be able to use a type system.
All tests pass on MacOSX and passed on linux the last time this was submitted.
llvm-svn: 244679
diff --git a/lldb/source/DataFormatters/NSArray.cpp b/lldb/source/DataFormatters/NSArray.cpp
index 640982e..0e665bd 100644
--- a/lldb/source/DataFormatters/NSArray.cpp
+++ b/lldb/source/DataFormatters/NSArray.cpp
@@ -528,11 +528,11 @@
m_items (0),
m_data_ptr (0)
{
- if (valobj_sp)
+ if (valobj_sp && valobj_sp->GetClangType().IsValid())
{
- clang::ASTContext *ast = valobj_sp->GetClangType().GetASTContext();
+ ClangASTContext *ast = valobj_sp->GetClangType().GetTypeSystem()->AsClangASTContext();
if (ast)
- m_id_type = ClangASTType(ast, ast->ObjCBuiltinIdTy);
+ m_id_type = ClangASTType(ast->getASTContext(), ast->getASTContext()->ObjCBuiltinIdTy);
}
}