diff options
| author | Alex Langford <apl@fb.com> | 2019-11-14 13:41:52 -0800 |
|---|---|---|
| committer | Alex Langford <apl@fb.com> | 2019-12-12 11:53:24 -0800 |
| commit | 3031818a2e9fca1e53cd882ccfcc3718699991b4 (patch) | |
| tree | 4682f9ca1c9db4b7be7170e3faac6c09b6aa6544 /lldb/source/Target | |
| parent | 7a54f727a2a546ab34df29f48c8e1a10218d74a6 (diff) | |
| download | bcm5719-llvm-3031818a2e9fca1e53cd882ccfcc3718699991b4.tar.gz bcm5719-llvm-3031818a2e9fca1e53cd882ccfcc3718699991b4.zip | |
[Target] Remove Target::GetScratchClangASTContext
Target doesn't really need to know about ClangASTContext more than any
other TypeSystem. We can create a method ClangASTContext::GetScratch for
anything who needs a ClangASTContext specifically instead of just a
generic TypeSystem.
Diffstat (limited to 'lldb/source/Target')
| -rw-r--r-- | lldb/source/Target/Target.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp index 59f72141ee5..dbbfb5368d4 100644 --- a/lldb/source/Target/Target.cpp +++ b/lldb/source/Target/Target.cpp @@ -2258,20 +2258,6 @@ Target::GetUtilityFunctionForLanguage(const char *text, return utility_fn; } -ClangASTContext *Target::GetScratchClangASTContext(bool create_on_demand) { - if (!m_valid) - return nullptr; - - auto type_system_or_err = - GetScratchTypeSystemForLanguage(eLanguageTypeC, create_on_demand); - if (auto err = type_system_or_err.takeError()) { - LLDB_LOG_ERROR(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_TARGET), - std::move(err), "Couldn't get scratch ClangASTContext"); - return nullptr; - } - return llvm::dyn_cast<ClangASTContext>(&type_system_or_err.get()); -} - ClangASTImporterSP Target::GetClangASTImporter() { if (m_valid) { if (!m_ast_importer_sp) { |

