diff options
Diffstat (limited to 'lldb/source/Expression/ClangASTSource.cpp')
-rw-r--r-- | lldb/source/Expression/ClangASTSource.cpp | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/lldb/source/Expression/ClangASTSource.cpp b/lldb/source/Expression/ClangASTSource.cpp index b6ea7a870de..3988cd674af 100644 --- a/lldb/source/Expression/ClangASTSource.cpp +++ b/lldb/source/Expression/ClangASTSource.cpp @@ -277,7 +277,7 @@ ClangASTSource::CompleteType (TagDecl *tag_decl) if (!clang_type) continue; - const TagType *tag_type = ClangASTContext::GetQualType(clang_type)->getAs<TagType>(); + const TagType *tag_type = clang_type.GetQualType()->getAs<TagType>(); if (!tag_type) continue; @@ -316,7 +316,7 @@ ClangASTSource::CompleteType (TagDecl *tag_decl) if (!clang_type) continue; - const TagType *tag_type = ClangASTContext::GetQualType(clang_type)->getAs<TagType>(); + const TagType *tag_type = clang_type.GetQualType()->getAs<TagType>(); if (!tag_type) continue; @@ -1886,13 +1886,9 @@ ClangASTSource::GuardedCopyType (const ClangASTType &src_type) { ClangASTMetrics::RegisterLLDBImport(); - ClangASTContext* src_ast = src_type.GetTypeSystem()->AsClangASTContext(); - if (!src_ast) - return ClangASTType(); - SetImportInProgress(true); - QualType copied_qual_type = m_ast_importer->CopyType (m_ast_context, src_ast->getASTContext(), ClangASTContext::GetQualType(src_type)); + QualType copied_qual_type = m_ast_importer->CopyType (m_ast_context, src_type.GetASTContext(), src_type.GetQualType()); SetImportInProgress(false); @@ -1912,20 +1908,16 @@ NameSearchContext::AddVarDecl(const ClangASTType &type) if (!type.IsValid()) return NULL; - ClangASTContext* lldb_ast = type.GetTypeSystem()->AsClangASTContext(); - if (!lldb_ast) - return NULL; - IdentifierInfo *ii = m_decl_name.getAsIdentifierInfo(); - clang::ASTContext *ast = lldb_ast->getASTContext(); + clang::ASTContext *ast = type.GetASTContext(); clang::NamedDecl *Decl = VarDecl::Create(*ast, const_cast<DeclContext*>(m_decl_context), SourceLocation(), SourceLocation(), ii, - ClangASTContext::GetQualType(type), + type.GetQualType(), 0, SC_Static); m_decls.push_back(Decl); @@ -1943,16 +1935,12 @@ NameSearchContext::AddFunDecl (const ClangASTType &type, bool extern_c) if (m_function_types.count(type)) return NULL; - - ClangASTContext* lldb_ast = type.GetTypeSystem()->AsClangASTContext(); - if (!lldb_ast) - return NULL; m_function_types.insert(type); - QualType qual_type (ClangASTContext::GetQualType(type)); + QualType qual_type (type.GetQualType()); - clang::ASTContext *ast = lldb_ast->getASTContext(); + clang::ASTContext *ast = type.GetASTContext(); const bool isInlineSpecified = false; const bool hasWrittenPrototype = true; @@ -2043,7 +2031,7 @@ NameSearchContext::AddTypeDecl(const ClangASTType &clang_type) { if (clang_type) { - QualType qual_type = ClangASTContext::GetQualType(clang_type); + QualType qual_type = clang_type.GetQualType(); if (const TypedefType *typedef_type = llvm::dyn_cast<TypedefType>(qual_type)) { |