diff options
| author | Raphael Isemann <teemperor@gmail.com> | 2019-11-29 13:02:41 +0100 |
|---|---|---|
| committer | Raphael Isemann <teemperor@gmail.com> | 2019-11-29 13:28:55 +0100 |
| commit | bc7f1df6b61a3c8f88f2541ef9ba73f4ee0ee4fe (patch) | |
| tree | d157ca65af2fc94ab2bb154765fa83f7e93a4628 /lldb/source/Symbol | |
| parent | 363cbcc59040dd337f958fd0fd0584f7c6ebbd63 (diff) | |
| download | bcm5719-llvm-bc7f1df6b61a3c8f88f2541ef9ba73f4ee0ee4fe.tar.gz bcm5719-llvm-bc7f1df6b61a3c8f88f2541ef9ba73f4ee0ee4fe.zip | |
[lldb][NFC] Explicitly ask for a ClangASTContext in ClangASTSource
ClangASTSource currently takes a clang::ASTContext and keeps that
around, but a lot of LLDB's functionality for doing operations
on a clang::ASTContext is in its ClangASTContext twin class. We
currently constantly recompute the respective ClangASTContext
from the clang::ASTContext while we instead could just pass and
store a ClangASTContext in the ClangASTSource. This also allows
us to get rid of a bunch of unreachable error checking for cases
where recomputation fails for some reason.
Diffstat (limited to 'lldb/source/Symbol')
| -rw-r--r-- | lldb/source/Symbol/ClangASTContext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp index adb8d57a74f..9988f061565 100644 --- a/lldb/source/Symbol/ClangASTContext.cpp +++ b/lldb/source/Symbol/ClangASTContext.cpp @@ -598,7 +598,7 @@ lldb::TypeSystemSP ClangASTContext::CreateInstance(lldb::LanguageType language, new ClangASTSource(target->shared_from_this())); lldbassert(ast_sp->getFileManager()); ast_sp->m_scratch_ast_source_up->InstallASTContext( - *ast_sp->getASTContext(), *ast_sp->getFileManager(), true); + *ast_sp, *ast_sp->getFileManager(), true); llvm::IntrusiveRefCntPtr<clang::ExternalASTSource> proxy_ast_source( ast_sp->m_scratch_ast_source_up->CreateProxy()); ast_sp->SetExternalSource(proxy_ast_source); |

