diff options
| author | Raphael Isemann <teemperor@gmail.com> | 2019-12-17 12:22:34 +0100 |
|---|---|---|
| committer | Raphael Isemann <teemperor@gmail.com> | 2019-12-17 12:24:31 +0100 |
| commit | ff0102b32cfe506dfc16a86e38e70b0940697aa2 (patch) | |
| tree | 5ca3f549f0f4768a7f8b95af6297382a521de7ed /lldb/source | |
| parent | df5a905aa8a868bdb700d88e427491ee56243e30 (diff) | |
| download | bcm5719-llvm-ff0102b32cfe506dfc16a86e38e70b0940697aa2.tar.gz bcm5719-llvm-ff0102b32cfe506dfc16a86e38e70b0940697aa2.zip | |
[lldb] Remove modern-type-lookup
Summary:
As discussed on the mailing list [1] we have to make a decision for how to proceed with the modern-type-lookup.
This patch removes modern-type-lookup from LLDB. This just removes all the code behind the modern-type-lookup
setting but it does *not* remove any code from Clang (i.e., the ExternalASTMerger and the clang-import-test stay around
for now).
The motivation for this is that I don't think that the current approach of implementing modern-type-lookup
will work out. Especially creating a completely new lookup system behind some setting that is never turned on by anyone
and then one day make one big switch to the new system seems wrong. It doesn't fit into the way LLVM is developed and has
so far made the transition work much more complicated than it has to be.
A lot of the benefits that were supposed to come with the modern-type-lookup are related to having a better organization
in the way types move across LLDB and having less dependencies on unrelated LLDB code. By just looking at the current code (mostly
the ClangASTImporter) I think we can reach the same goals by just incrementally cleaning up, documenting, refactoring
and actually testing the existing code we have.
[1] http://lists.llvm.org/pipermail/lldb-dev/2019-December/015831.html
Reviewers: shafik, martong
Subscribers: rnkovacs, christof, arphaman, JDevlieghere, usaxena95, lldb-commits, friss
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D71562
Diffstat (limited to 'lldb/source')
10 files changed, 7 insertions, 304 deletions
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp index 58db9d4e742..94a23c8069a 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp @@ -52,9 +52,7 @@ private: ClangASTSource::ClangASTSource(const lldb::TargetSP &target) : m_import_in_progress(false), m_lookups_enabled(false), m_target(target), m_ast_context(nullptr), m_active_lexical_decls(), m_active_lookups() { - if (!target->GetUseModernTypeLookup()) { - m_ast_importer_sp = m_target->GetClangASTImporter(); - } + m_ast_importer_sp = m_target->GetClangASTImporter(); } void ClangASTSource::InstallASTContext(ClangASTContext &clang_ast_context, @@ -63,81 +61,7 @@ void ClangASTSource::InstallASTContext(ClangASTContext &clang_ast_context, m_ast_context = clang_ast_context.getASTContext(); m_clang_ast_context = &clang_ast_context; m_file_manager = &file_manager; - if (m_target->GetUseModernTypeLookup()) { - // Configure the ExternalASTMerger. The merger needs to be able to import - // types from any source that we would do lookups in, which includes the - // persistent AST context as well as the modules and Objective-C runtime - // AST contexts. - - lldbassert(!m_merger_up); - clang::ExternalASTMerger::ImporterTarget target = {*m_ast_context, - file_manager}; - std::vector<clang::ExternalASTMerger::ImporterSource> sources; - for (lldb::ModuleSP module_sp : m_target->GetImages().Modules()) { - auto type_system_or_err = - module_sp->GetTypeSystemForLanguage(lldb::eLanguageTypeC); - if (auto err = type_system_or_err.takeError()) { - LLDB_LOG_ERROR( - lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_EXPRESSIONS), - std::move(err), "Failed to get ClangASTContext"); - } else if (auto *module_ast_ctx = llvm::cast_or_null<ClangASTContext>( - &type_system_or_err.get())) { - lldbassert(module_ast_ctx->getASTContext()); - lldbassert(module_ast_ctx->getFileManager()); - sources.emplace_back(*module_ast_ctx->getASTContext(), - *module_ast_ctx->getFileManager(), - module_ast_ctx->GetOriginMap()); - } - } - - do { - lldb::ProcessSP process(m_target->GetProcessSP()); - - if (!process) - break; - - ObjCLanguageRuntime *language_runtime(ObjCLanguageRuntime::Get(*process)); - - if (!language_runtime) - break; - - if (auto *runtime_decl_vendor = llvm::dyn_cast_or_null<ClangDeclVendor>( - language_runtime->GetDeclVendor())) { - sources.push_back(runtime_decl_vendor->GetImporterSource()); - } - } while (false); - - do { - auto *modules_decl_vendor = m_target->GetClangModulesDeclVendor(); - - if (!modules_decl_vendor) - break; - - sources.push_back(modules_decl_vendor->GetImporterSource()); - } while (false); - - if (!is_shared_context) { - // Update the scratch AST context's merger to reflect any new sources we - // might have come across since the last time an expression was parsed. - - if (auto *clang_ast_context = ClangASTContext::GetScratch(*m_target)) { - - auto scratch_ast_context = - static_cast<ClangASTContextForExpressions *>(clang_ast_context); - - scratch_ast_context->GetMergerUnchecked().AddSources(sources); - - sources.push_back({*scratch_ast_context->getASTContext(), - *scratch_ast_context->getFileManager(), - scratch_ast_context->GetOriginMap()}); - } - } - - m_merger_up = - std::make_unique<clang::ExternalASTMerger>(target, sources); - } else { - m_ast_importer_sp->InstallMapCompleter(m_ast_context, *this); - } + m_ast_importer_sp->InstallMapCompleter(m_ast_context, *this); } ClangASTSource::~ClangASTSource() { @@ -293,9 +217,6 @@ void ClangASTSource::CompleteType(TagDecl *tag_decl) { ScopedLexicalDeclEraser eraser(m_active_lexical_decls, tag_decl); if (!m_ast_importer_sp) { - if (HasMerger()) { - GetMergerUnchecked().CompleteType(tag_decl); - } return; } @@ -423,18 +344,7 @@ void ClangASTSource::CompleteType(clang::ObjCInterfaceDecl *interface_decl) { ClangUtil::DumpDecl(interface_decl)); if (!m_ast_importer_sp) { - if (HasMerger()) { - ObjCInterfaceDecl *complete_iface_decl = - GetCompleteObjCInterface(interface_decl); - - if (complete_iface_decl && (complete_iface_decl != interface_decl)) { - m_merger_up->ForceRecordOrigin(interface_decl, {complete_iface_decl, &complete_iface_decl->getASTContext()}); - } - - GetMergerUnchecked().CompleteType(interface_decl); - } else { - lldbassert(0 && "No mechanism for completing a type!"); - } + lldbassert(0 && "No mechanism for completing a type!"); return; } @@ -510,19 +420,7 @@ void ClangASTSource::FindExternalLexicalDecls( llvm::function_ref<bool(Decl::Kind)> predicate, llvm::SmallVectorImpl<Decl *> &decls) { - if (HasMerger()) { - if (auto *interface_decl = dyn_cast<ObjCInterfaceDecl>(decl_context)) { - ObjCInterfaceDecl *complete_iface_decl = - GetCompleteObjCInterface(interface_decl); - - if (complete_iface_decl && (complete_iface_decl != interface_decl)) { - m_merger_up->ForceRecordOrigin(interface_decl, {complete_iface_decl, &complete_iface_decl->getASTContext()}); - } - } - return GetMergerUnchecked().FindExternalLexicalDecls(decl_context, - predicate, - decls); - } else if (!m_ast_importer_sp) + if (!m_ast_importer_sp) return; Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); @@ -698,25 +596,6 @@ void ClangASTSource::FindExternalVisibleDecls(NameSearchContext &context) { name.GetCString(), context.m_decl_context->getDeclKindName()); } - if (HasMerger() && !isa<TranslationUnitDecl>(context.m_decl_context) - /* possibly handle NamespaceDecls here? */) { - if (auto *interface_decl = - dyn_cast<ObjCInterfaceDecl>(context.m_decl_context)) { - ObjCInterfaceDecl *complete_iface_decl = - GetCompleteObjCInterface(interface_decl); - - if (complete_iface_decl && (complete_iface_decl != interface_decl)) { - GetMergerUnchecked().ForceRecordOrigin( - interface_decl, - {complete_iface_decl, &complete_iface_decl->getASTContext()}); - } - } - - GetMergerUnchecked().FindExternalVisibleDeclsByName(context.m_decl_context, - context.m_decl_name); - return; // otherwise we may need to fall back - } - context.m_namespace_map = std::make_shared<ClangASTImporter::NamespaceMap>(); if (const NamespaceDecl *namespace_context = @@ -741,7 +620,7 @@ void ClangASTSource::FindExternalVisibleDecls(NameSearchContext &context) { FindExternalVisibleDecls(context, i->first, i->second, current_id); } - } else if (isa<ObjCInterfaceDecl>(context.m_decl_context) && !HasMerger()) { + } else if (isa<ObjCInterfaceDecl>(context.m_decl_context)) { FindObjCPropertyAndIvarDecls(context); } else if (!isa<TranslationUnitDecl>(context.m_decl_context)) { // we shouldn't be getting FindExternalVisibleDecls calls for these @@ -820,7 +699,7 @@ void ClangASTSource::FindExternalVisibleDecls( module_sp->GetFileSpec().GetFilename().GetCString()); } } - } else if (!HasMerger()) { + } else { const ModuleList &target_images = m_target->GetImages(); std::lock_guard<std::recursive_mutex> guard(target_images.GetMutex()); @@ -1131,21 +1010,6 @@ bool ClangASTSource::FindObjCMethodDeclsWithOrigin( void ClangASTSource::FindObjCMethodDecls(NameSearchContext &context) { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); - if (HasMerger()) { - if (auto *interface_decl = dyn_cast<ObjCInterfaceDecl>(context.m_decl_context)) { - ObjCInterfaceDecl *complete_iface_decl = - GetCompleteObjCInterface(interface_decl); - - if (complete_iface_decl && (complete_iface_decl != context.m_decl_context)) { - m_merger_up->ForceRecordOrigin(interface_decl, {complete_iface_decl, &complete_iface_decl->getASTContext()}); - } - } - - GetMergerUnchecked().FindExternalVisibleDeclsByName(context.m_decl_context, - context.m_decl_name); - return; - } - static unsigned int invocation_id = 0; unsigned int current_id = invocation_id++; @@ -1950,45 +1814,10 @@ NamespaceDecl *ClangASTSource::AddNamespace( return dyn_cast<NamespaceDecl>(copied_decl); } -clang::QualType ClangASTSource::CopyTypeWithMerger( - clang::ASTContext &from_context, - clang::ExternalASTMerger &merger, - clang::QualType type) { - if (!merger.HasImporterForOrigin(from_context)) { - lldbassert(0 && "Couldn't find the importer for a source context!"); - return QualType(); - } - - if (llvm::Expected<QualType> type_or_error = - merger.ImporterForOrigin(from_context).Import(type)) { - return *type_or_error; - } else { - Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS); - LLDB_LOG_ERROR(log, type_or_error.takeError(), "Couldn't import type: {0}"); - return QualType(); - } -} - 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); - } else if (m_merger_up) { - if (!m_merger_up->HasImporterForOrigin(from_context)) { - lldbassert(0 && "Couldn't find the importer for a source context!"); - return nullptr; - } - - if (llvm::Expected<Decl *> decl_or_error = - m_merger_up->ImporterForOrigin(from_context).Import(src_decl)) { - return *decl_or_error; - } else { - Log *log = - lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS); - LLDB_LOG_ERROR(log, decl_or_error.takeError(), - "Couldn't import decl: {0}"); - return nullptr; - } } else { lldbassert(0 && "No mechanism for copying a decl!"); return nullptr; @@ -1998,19 +1827,12 @@ clang::Decl *ClangASTSource::CopyDecl(Decl *src_decl) { ClangASTImporter::DeclOrigin ClangASTSource::GetDeclOrigin(const clang::Decl *decl) { if (m_ast_importer_sp) { return m_ast_importer_sp->GetDeclOrigin(decl); - } else if (m_merger_up) { - return ClangASTImporter::DeclOrigin(); // Implement this correctly in ExternalASTMerger } else { // this can happen early enough that no ExternalASTSource is installed. return ClangASTImporter::DeclOrigin(); } } -clang::ExternalASTMerger &ClangASTSource::GetMergerUnchecked() { - lldbassert(m_merger_up != nullptr); - return *m_merger_up; -} - CompilerType ClangASTSource::GuardedCopyType(const CompilerType &src_type) { ClangASTContext *src_ast = llvm::dyn_cast_or_null<ClangASTContext>(src_type.GetTypeSystem()); @@ -2024,10 +1846,6 @@ CompilerType ClangASTSource::GuardedCopyType(const CompilerType &src_type) { if (m_ast_importer_sp) { copied_qual_type = ClangUtil::GetQualType( m_ast_importer_sp->CopyType(*m_clang_ast_context, src_type)); - } else if (m_merger_up) { - copied_qual_type = - CopyTypeWithMerger(*src_ast->getASTContext(), *m_merger_up, - ClangUtil::GetQualType(src_type)); } else { lldbassert(0 && "No mechanism for copying a type!"); return CompilerType(); diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h index 9d9eb49f1cb..0ae65e526e7 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h @@ -15,7 +15,6 @@ #include "lldb/Symbol/ClangExternalASTSourceCommon.h" #include "lldb/Symbol/CompilerType.h" #include "lldb/Target/Target.h" -#include "clang/AST/ExternalASTMerger.h" #include "clang/Basic/IdentifierTable.h" #include "llvm/ADT/SmallSet.h" @@ -340,24 +339,6 @@ public: /// A copy of the Decl in m_ast_context, or NULL if the copy failed. clang::Decl *CopyDecl(clang::Decl *src_decl); - /// Copies a single Type to the target of the given ExternalASTMerger. - /// - /// \param[in] src_context - /// The ASTContext containing the type. - /// - /// \param[in] merger - /// The merger to use. This isn't just *m_merger_up because it might be - /// the persistent AST context's merger. - /// - /// \param[in] type - /// The type to copy. - /// - /// \return - /// A copy of the Type in the merger's target context. - clang::QualType CopyTypeWithMerger(clang::ASTContext &src_context, - clang::ExternalASTMerger &merger, - clang::QualType type); - /// Determined the origin of a single Decl, if it can be found. /// /// \param[in] decl @@ -373,14 +354,6 @@ public: /// True if lookup succeeded; false otherwise. ClangASTImporter::DeclOrigin GetDeclOrigin(const clang::Decl *decl); - /// Returns m_merger_up. Only call this if the target is configured to use - /// modern lookup, - clang::ExternalASTMerger &GetMergerUnchecked(); - - /// Returns true if there is a merger. This only occurs if the target is - /// using modern lookup. - bool HasMerger() { return (bool)m_merger_up; } - protected: bool FindObjCMethodDeclsWithOrigin( unsigned int current_id, NameSearchContext &context, @@ -401,8 +374,6 @@ protected: clang::FileManager *m_file_manager; /// The target's AST importer. lldb::ClangASTImporterSP m_ast_importer_sp; - /// The ExternalASTMerger for this parse. - std::unique_ptr<clang::ExternalASTMerger> m_merger_up; std::set<const clang::Decl *> m_active_lexical_decls; std::set<const char *> m_active_lookups; }; diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangDeclVendor.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangDeclVendor.h index 90b715f37cb..85a10400a20 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangDeclVendor.h +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangDeclVendor.h @@ -12,8 +12,6 @@ #include "lldb/Core/ClangForward.h" #include "lldb/Symbol/DeclVendor.h" -#include "clang/AST/ExternalASTMerger.h" - namespace lldb_private { // A clang specialized extension to DeclVendor. @@ -23,13 +21,6 @@ public: virtual ~ClangDeclVendor() {} - /// Interface for ExternalASTMerger. Returns an ImporterSource allowing type - /// completion. - /// - /// \return - /// An ImporterSource for this ClangDeclVendor. - virtual clang::ExternalASTMerger::ImporterSource GetImporterSource() = 0; - uint32_t FindDecls(ConstString name, bool append, uint32_t max_matches, std::vector<CompilerDecl> &decls) override; diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp index 192e43a4606..3a6b7018e48 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp @@ -173,31 +173,6 @@ ClangExpressionDeclMap::TargetInfo ClangExpressionDeclMap::GetTargetInfo() { return ret; } -static clang::QualType ExportAllDeclaredTypes( - clang::ExternalASTMerger &parent_merger, clang::ExternalASTMerger &merger, - clang::ASTContext &source, clang::FileManager &source_file_manager, - const clang::ExternalASTMerger::OriginMap &source_origin_map, - clang::FileID file, clang::QualType root) { - // Mark the source as temporary to make sure all declarations from the - // AST are exported. Also add the parent_merger as the merger into the - // source AST so that the merger can track back any declarations from - // the persistent ASTs we used as sources. - clang::ExternalASTMerger::ImporterSource importer_source( - source, source_file_manager, source_origin_map, /*Temporary*/ true, - &parent_merger); - merger.AddSources(importer_source); - clang::ASTImporter &exporter = merger.ImporterForOrigin(source); - llvm::Expected<clang::QualType> ret_or_error = exporter.Import(root); - merger.RemoveSources(importer_source); - if (ret_or_error) { - return *ret_or_error; - } else { - Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS); - LLDB_LOG_ERROR(log, ret_or_error.takeError(), "Couldn't import type: {0}"); - return clang::QualType(); - } -} - TypeFromUser ClangExpressionDeclMap::DeportType(ClangASTContext &target, ClangASTContext &source, TypeFromParser parser_type) { @@ -207,18 +182,6 @@ TypeFromUser ClangExpressionDeclMap::DeportType(ClangASTContext &target, if (m_ast_importer_sp) { return TypeFromUser(m_ast_importer_sp->DeportType(target, parser_type)); - } else if (m_merger_up) { - clang::FileID source_file = - source.getASTContext()->getSourceManager().getFileID( - source.getASTContext()->getTranslationUnitDecl()->getLocation()); - auto scratch_ast_context = static_cast<ClangASTContextForExpressions *>( - ClangASTContext::GetScratch(*m_target)); - clang::QualType exported_type = ExportAllDeclaredTypes( - *m_merger_up.get(), scratch_ast_context->GetMergerUnchecked(), - *source.getASTContext(), *source.getFileManager(), - m_merger_up->GetOrigins(), source_file, - clang::QualType::getFromOpaquePtr(parser_type.GetOpaqueQualType())); - return TypeFromUser(exported_type.getAsOpaquePtr(), &target); } else { lldbassert(0 && "No mechanism for deporting a type!"); return TypeFromUser(); diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp index f3bb24ee79d..ff0905dda4e 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp @@ -84,8 +84,6 @@ public: void ForEachMacro(const ModuleVector &modules, std::function<bool(const std::string &)> handler) override; - - clang::ExternalASTMerger::ImporterSource GetImporterSource() override; private: void ReportModuleExportsHelper(std::set<ClangModulesDeclVendor::ModuleID> &exports, @@ -110,7 +108,6 @@ private: typedef std::set<ModuleID> ImportedModuleSet; ImportedModuleMap m_imported_modules; ImportedModuleSet m_user_imported_modules; - const clang::ExternalASTMerger::OriginMap m_origin_map; // We assume that every ASTContext has an ClangASTContext, so we also store // a custom ClangASTContext for our internal ASTContext. std::unique_ptr<ClangASTContext> m_ast_context; @@ -160,7 +157,7 @@ ClangModulesDeclVendorImpl::ClangModulesDeclVendorImpl( : m_diagnostics_engine(std::move(diagnostics_engine)), m_compiler_invocation(std::move(compiler_invocation)), m_compiler_instance(std::move(compiler_instance)), - m_parser(std::move(parser)), m_origin_map() { + m_parser(std::move(parser)) { // Initialize our ClangASTContext. m_ast_context.reset(new ClangASTContext(m_compiler_instance->getASTContext())); @@ -569,13 +566,6 @@ ClangModulesDeclVendorImpl::DoGetModule(clang::ModuleIdPath path, is_inclusion_directive); } -clang::ExternalASTMerger::ImporterSource -ClangModulesDeclVendorImpl::GetImporterSource() { - return clang::ExternalASTMerger::ImporterSource( - m_compiler_instance->getASTContext(), - m_compiler_instance->getFileManager(), m_origin_map); -} - static const char *ModuleImportBufferName = "LLDBModulesMemoryBuffer"; lldb_private::ClangModulesDeclVendor * diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp index 43539202300..6acd6a6df6b 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp @@ -639,10 +639,3 @@ AppleObjCDeclVendor::FindDecls(ConstString name, bool append, return ret; } - -clang::ExternalASTMerger::ImporterSource -AppleObjCDeclVendor::GetImporterSource() { - return clang::ExternalASTMerger::ImporterSource(*m_ast_ctx.getASTContext(), - *m_ast_ctx.getFileManager(), - m_ast_ctx.GetOriginMap()); -} diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.h b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.h index 99ca4b74870..311113a2773 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.h +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.h @@ -30,8 +30,6 @@ public: uint32_t FindDecls(ConstString name, bool append, uint32_t max_matches, std::vector<clang::NamedDecl *> &decls) override; - clang::ExternalASTMerger::ImporterSource GetImporterSource() override; - friend class AppleObjCExternalASTSource; private: diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp index 3b6b0db3449..efc7b4d780e 100644 --- a/lldb/source/Symbol/ClangASTContext.cpp +++ b/lldb/source/Symbol/ClangASTContext.cpp @@ -9517,9 +9517,3 @@ PersistentExpressionState * ClangASTContextForExpressions::GetPersistentExpressionState() { return m_persistent_variables.get(); } - -clang::ExternalASTMerger & -ClangASTContextForExpressions::GetMergerUnchecked() { - lldbassert(m_scratch_ast_source_up != nullptr); - return m_scratch_ast_source_up->GetMergerUnchecked(); -} diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp index dbbfb5368d4..83dc3de3ce5 100644 --- a/lldb/source/Target/Target.cpp +++ b/lldb/source/Target/Target.cpp @@ -3545,18 +3545,6 @@ void TargetProperties::SetInjectLocalVariables(ExecutionContext *exe_ctx, true); } -bool TargetProperties::GetUseModernTypeLookup() const { - const Property *exp_property = m_collection_sp->GetPropertyAtIndex( - nullptr, false, ePropertyExperimental); - OptionValueProperties *exp_values = - exp_property->GetValue()->GetAsProperties(); - if (exp_values) - return exp_values->GetPropertyAtIndexAsBoolean( - nullptr, ePropertyUseModernTypeLookup, true); - else - return true; -} - ArchSpec TargetProperties::GetDefaultArchitecture() const { OptionValueArch *value = m_collection_sp->GetPropertyAtIndexAsOptionValueArch( nullptr, ePropertyDefaultArch); diff --git a/lldb/source/Target/TargetProperties.td b/lldb/source/Target/TargetProperties.td index 9079c3cf427..ff8062aaa2c 100644 --- a/lldb/source/Target/TargetProperties.td +++ b/lldb/source/Target/TargetProperties.td @@ -4,9 +4,6 @@ let Definition = "experimental" in { def InjectLocalVars : Property<"inject-local-vars", "Boolean">, Global, DefaultTrue, Desc<"If true, inject local variables explicitly into the expression text. This will fix symbol resolution when there are name collisions between ivars and local variables. But it can make expressions run much more slowly.">; - def UseModernTypeLookup : Property<"use-modern-type-lookup", "Boolean">, - Global, DefaultFalse, - Desc<"If true, use Clang's modern type lookup infrastructure.">; } let Definition = "target" in { |

