summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/ClangASTSource.cpp
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2015-06-08 23:38:06 +0000
committerPavel Labath <labath@google.com>2015-06-08 23:38:06 +0000
commitc7c30eb52832dc20a7afe6640ac4ab361ff9b9fe (patch)
treef92b605a516615b447eefa8d9d21381cfc113b70 /lldb/source/Expression/ClangASTSource.cpp
parent4e8e900dd1f21b5b5458affd5d6c2c89f07fdd28 (diff)
downloadbcm5719-llvm-c7c30eb52832dc20a7afe6640ac4ab361ff9b9fe.tar.gz
bcm5719-llvm-c7c30eb52832dc20a7afe6640ac4ab361ff9b9fe.zip
Revert "Introduce a TypeSystem interface to support adding non-clang languages."
This seems to break expression evaluation on the linux build. llvm-svn: 239366
Diffstat (limited to 'lldb/source/Expression/ClangASTSource.cpp')
-rw-r--r--lldb/source/Expression/ClangASTSource.cpp28
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))
{
OpenPOWER on IntegriCloud