diff options
| author | Raphael Isemann <teemperor@gmail.com> | 2019-12-20 18:44:39 +0100 |
|---|---|---|
| committer | Raphael Isemann <teemperor@gmail.com> | 2019-12-20 18:45:14 +0100 |
| commit | 6be76f491fcbb2a8476e58cb8d3310155c71e74a (patch) | |
| tree | 755321a01e23f20b4934bc443f7a889c81e5e3a3 /lldb/source/Plugins | |
| parent | 2f209ccfbe5e6b33088763b1e022ba876fb0f35c (diff) | |
| download | bcm5719-llvm-6be76f491fcbb2a8476e58cb8d3310155c71e74a.tar.gz bcm5719-llvm-6be76f491fcbb2a8476e58cb8d3310155c71e74a.zip | |
[lldb][NFC] Remove redundant ASTContext args to CopyDecl/DeportDecl
We already pass a Decl here and the additional ASTContext needs to
match the Decl. We might as well just pass the Decl and then extract
the ASTContext from that.
Diffstat (limited to 'lldb/source/Plugins')
| -rw-r--r-- | lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp | 3 | ||||
| -rw-r--r-- | lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp | 3 |
2 files changed, 2 insertions, 4 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; |

