This revision was automatically updated to reflect the committed changes. Closed by commit rG502773d74341: [lldb][NFC] Remove ImportInProgress lock in ClangASTSource (authored by teemperor). Herald added a project: LLDB. Herald added a subscriber: lldb-commits.
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81749/new/ https://reviews.llvm.org/D81749 Files: lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp Index: lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp =================================================================== --- lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp +++ lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp @@ -632,11 +632,6 @@ Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); - if (GetImportInProgress()) { - LLDB_LOGV(log, "Ignoring a query during an import"); - return; - } - if (log) { if (!context.m_decl_context) LLDB_LOG(log, Index: lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h =================================================================== --- lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h +++ lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h @@ -197,11 +197,6 @@ clang::Sema *getSema(); - void SetImportInProgress(bool import_in_progress) { - m_import_in_progress = import_in_progress; - } - bool GetImportInProgress() { return m_import_in_progress; } - void SetLookupsEnabled(bool lookups_enabled) { m_lookups_enabled = lookups_enabled; } @@ -376,7 +371,6 @@ friend struct NameSearchContext; - bool m_import_in_progress; bool m_lookups_enabled; /// The target to use in finding variables and types. Index: lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp =================================================================== --- lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp +++ lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp @@ -53,9 +53,9 @@ ClangASTSource::ClangASTSource( const lldb::TargetSP &target, const std::shared_ptr<ClangASTImporter> &importer) - : m_import_in_progress(false), m_lookups_enabled(false), m_target(target), - m_ast_context(nullptr), m_ast_importer_sp(importer), - m_active_lexical_decls(), m_active_lookups() { + : m_lookups_enabled(false), m_target(target), m_ast_context(nullptr), + m_ast_importer_sp(importer), m_active_lexical_decls(), + m_active_lookups() { assert(m_ast_importer_sp && "No ClangASTImporter passed to ClangASTSource?"); } @@ -103,11 +103,6 @@ return false; } - if (GetImportInProgress()) { - SetNoExternalVisibleDeclsForName(decl_ctx, clang_decl_name); - return false; - } - std::string decl_name(clang_decl_name.getAsString()); switch (clang_decl_name.getNameKind()) { @@ -1744,13 +1739,9 @@ if (src_ast == nullptr) return CompilerType(); - SetImportInProgress(true); - QualType copied_qual_type = ClangUtil::GetQualType( m_ast_importer_sp->CopyType(*m_clang_ast_context, src_type)); - SetImportInProgress(false); - if (copied_qual_type.getAsOpaquePtr() && copied_qual_type->getCanonicalTypeInternal().isNull()) // this shouldn't happen, but we're hardening because the AST importer
Index: lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp =================================================================== --- lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp +++ lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp @@ -632,11 +632,6 @@ Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); - if (GetImportInProgress()) { - LLDB_LOGV(log, "Ignoring a query during an import"); - return; - } - if (log) { if (!context.m_decl_context) LLDB_LOG(log, Index: lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h =================================================================== --- lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h +++ lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h @@ -197,11 +197,6 @@ clang::Sema *getSema(); - void SetImportInProgress(bool import_in_progress) { - m_import_in_progress = import_in_progress; - } - bool GetImportInProgress() { return m_import_in_progress; } - void SetLookupsEnabled(bool lookups_enabled) { m_lookups_enabled = lookups_enabled; } @@ -376,7 +371,6 @@ friend struct NameSearchContext; - bool m_import_in_progress; bool m_lookups_enabled; /// The target to use in finding variables and types. Index: lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp =================================================================== --- lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp +++ lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp @@ -53,9 +53,9 @@ ClangASTSource::ClangASTSource( const lldb::TargetSP &target, const std::shared_ptr<ClangASTImporter> &importer) - : m_import_in_progress(false), m_lookups_enabled(false), m_target(target), - m_ast_context(nullptr), m_ast_importer_sp(importer), - m_active_lexical_decls(), m_active_lookups() { + : m_lookups_enabled(false), m_target(target), m_ast_context(nullptr), + m_ast_importer_sp(importer), m_active_lexical_decls(), + m_active_lookups() { assert(m_ast_importer_sp && "No ClangASTImporter passed to ClangASTSource?"); } @@ -103,11 +103,6 @@ return false; } - if (GetImportInProgress()) { - SetNoExternalVisibleDeclsForName(decl_ctx, clang_decl_name); - return false; - } - std::string decl_name(clang_decl_name.getAsString()); switch (clang_decl_name.getNameKind()) { @@ -1744,13 +1739,9 @@ if (src_ast == nullptr) return CompilerType(); - SetImportInProgress(true); - QualType copied_qual_type = ClangUtil::GetQualType( m_ast_importer_sp->CopyType(*m_clang_ast_context, src_type)); - SetImportInProgress(false); - if (copied_qual_type.getAsOpaquePtr() && copied_qual_type->getCanonicalTypeInternal().isNull()) // this shouldn't happen, but we're hardening because the AST importer
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits