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.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186130 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/Thread.cpp b/source/Target/Thread.cpp
index 508238d..12ec40f 100644
--- a/source/Target/Thread.cpp
+++ b/source/Target/Thread.cpp
@@ -1677,13 +1677,12 @@
             Type *function_type = sc.function->GetType();
             if (function_type)
             {
-                clang_type_t return_type = sc.function->GetReturnClangType();
+                ClangASTType return_type = sc.function->GetClangType().GetFunctionReturnType();
                 if (return_type)
                 {
-                    ClangASTType ast_type (function_type->GetClangAST(), return_type);
                     StreamString s;
-                    ast_type.DumpTypeDescription(&s);
-                    ValueObjectSP cast_value_sp = return_value_sp->Cast(ast_type);
+                    return_type.DumpTypeDescription(&s);
+                    ValueObjectSP cast_value_sp = return_value_sp->Cast(return_type);
                     if (cast_value_sp)
                     {
                         cast_value_sp->SetFormat(eFormatHex);