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
This commit is contained in:
Greg Clayton
2013-07-11 22:46:58 +00:00
parent 37002ad30e
commit 57ee306789
104 changed files with 8335 additions and 10425 deletions

View File

@@ -506,7 +506,7 @@ SBModule::FindFirstType (const char *name_cstr)
sb_type = SBType (module_sp->FindFirstType(sc, name, exact_match));
if (!sb_type.IsValid())
sb_type = SBType (ClangASTType::GetBasicType (module_sp->GetClangASTContext().getASTContext(), name));
sb_type = SBType (ClangASTContext::GetBasicType (module_sp->GetClangASTContext().getASTContext(), name));
}
return sb_type;
}
@@ -516,7 +516,7 @@ SBModule::GetBasicType(lldb::BasicType type)
{
ModuleSP module_sp (GetSP ());
if (module_sp)
return SBType (ClangASTType::GetBasicType (module_sp->GetClangASTContext().getASTContext(), type));
return SBType (ClangASTContext::GetBasicType (module_sp->GetClangASTContext().getASTContext(), type));
return SBType();
}
@@ -549,7 +549,7 @@ SBModule::FindTypes (const char *type)
}
else
{
SBType sb_type(ClangASTType::GetBasicType (module_sp->GetClangASTContext().getASTContext(), name));
SBType sb_type(ClangASTContext::GetBasicType (module_sp->GetClangASTContext().getASTContext(), name));
if (sb_type.IsValid())
retval.Append(sb_type);
}