summaryrefslogtreecommitdiffstats
path: root/lldb/source
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp3
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp3
-rw-r--r--lldb/source/Symbol/ClangASTImporter.cpp6
3 files changed, 5 insertions, 7 deletions
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp
index 24dc7268976..6d6830c740d 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp
@@ -453,8 +453,7 @@ void ASTResultSynthesizer::CommitPersistentDecls() {
ConstString name_cs(name.str().c_str());
Decl *D_scratch = m_target.GetClangASTImporter()->DeportDecl(
- ClangASTContext::GetScratch(m_target)->getASTContext(), m_ast_context,
- decl);
+ ClangASTContext::GetScratch(m_target)->getASTContext(), decl);
if (!D_scratch) {
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
index f37fe21b554..e326d239cb5 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
@@ -1823,9 +1823,8 @@ NamespaceDecl *ClangASTSource::AddNamespace(
}
clang::Decl *ClangASTSource::CopyDecl(Decl *src_decl) {
- clang::ASTContext &from_context = src_decl->getASTContext();
if (m_ast_importer_sp) {
- return m_ast_importer_sp->CopyDecl(m_ast_context, &from_context, src_decl);
+ return m_ast_importer_sp->CopyDecl(m_ast_context, src_decl);
} else {
lldbassert(0 && "No mechanism for copying a decl!");
return nullptr;
diff --git a/lldb/source/Symbol/ClangASTImporter.cpp b/lldb/source/Symbol/ClangASTImporter.cpp
index d856443b268..7bdbe2bcc1d 100644
--- a/lldb/source/Symbol/ClangASTImporter.cpp
+++ b/lldb/source/Symbol/ClangASTImporter.cpp
@@ -65,10 +65,10 @@ CompilerType ClangASTImporter::CopyType(ClangASTContext &dst_ast,
}
clang::Decl *ClangASTImporter::CopyDecl(clang::ASTContext *dst_ast,
- clang::ASTContext *src_ast,
clang::Decl *decl) {
ImporterDelegateSP delegate_sp;
+ clang::ASTContext *src_ast = &decl->getASTContext();
delegate_sp = GetDelegate(dst_ast, src_ast);
ASTImporterDelegate::CxxModuleScope std_scope(*delegate_sp, dst_ast);
@@ -320,10 +320,10 @@ CompilerType ClangASTImporter::DeportType(ClangASTContext &dst,
}
clang::Decl *ClangASTImporter::DeportDecl(clang::ASTContext *dst_ctx,
- clang::ASTContext *src_ctx,
clang::Decl *decl) {
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
+ clang::ASTContext *src_ctx = &decl->getASTContext();
LLDB_LOGF(log,
" [ClangASTImporter] DeportDecl called on (%sDecl*)%p from "
"(ASTContext*)%p to (ASTContext*)%p",
@@ -337,7 +337,7 @@ clang::Decl *ClangASTImporter::DeportDecl(clang::ASTContext *dst_ctx,
clang::Decl *result;
{
CompleteTagDeclsScope complete_scope(*this, dst_ctx, src_ctx);
- result = CopyDecl(dst_ctx, src_ctx, decl);
+ result = CopyDecl(dst_ctx, decl);
}
if (!result)
OpenPOWER on IntegriCloud