Huge change to clean up types.
A long time ago we start with clang types that were created by the symbol files and there were many functions in lldb_private::ClangASTContext that helped. Later we create ClangASTType which contains a clang::ASTContext and an opauque QualType, but we didn't switch over to fully using it. There were a lot of places where we would pass around a raw clang_type_t and also pass along a clang::ASTContext separately. This left room for error.
This checkin change all type code over to use ClangASTType everywhere and I cleaned up the interfaces quite a bit. Any code that was in ClangASTContext that was type related, was moved over into ClangASTType. All code that used these types was switched over to use all of the new goodness.
llvm-svn: 186130
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index 4a6477f..01e5ae3 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -1632,9 +1632,10 @@
}
// TODO use flags for these
- bool is_array = ClangASTContext::IsArrayType(target->GetClangType(), NULL, NULL, NULL);
- bool is_pointer = ClangASTContext::IsPointerType(target->GetClangType());
- bool is_aggregate = ClangASTContext::IsAggregateType(target->GetClangType());
+ const uint32_t type_info_flags = target->GetClangType().GetTypeInfo(NULL);
+ bool is_array = (type_info_flags & ClangASTType::eTypeIsArray) != 0;
+ bool is_pointer = (type_info_flags & ClangASTType::eTypeIsPointer) != 0;
+ bool is_aggregate = target->GetClangType().IsAggregateType();
if ((is_array || is_pointer) && (!is_array_range) && val_obj_display == ValueObject::eValueObjectRepresentationStyleValue) // this should be wrong, but there are some exceptions
{