This revision was automatically updated to reflect the committed changes. Closed by commit rG77da826edad0: [lldb] Make CompleteTagDeclsScope completion order deterministic (authored by teemperor).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72495/new/ https://reviews.llvm.org/D72495 Files: lldb/source/Symbol/ClangASTImporter.cpp Index: lldb/source/Symbol/ClangASTImporter.cpp =================================================================== --- lldb/source/Symbol/ClangASTImporter.cpp +++ lldb/source/Symbol/ClangASTImporter.cpp @@ -214,7 +214,7 @@ /// imported while completing the original Decls). class CompleteTagDeclsScope : public ClangASTImporter::NewDeclListener { ClangASTImporter::ImporterDelegateSP m_delegate; - llvm::SmallPtrSet<NamedDecl *, 32> m_decls_to_complete; + llvm::SmallVector<NamedDecl *, 32> m_decls_to_complete; llvm::SmallPtrSet<NamedDecl *, 32> m_decls_already_completed; clang::ASTContext *m_dst_ctx; clang::ASTContext *m_src_ctx; @@ -239,10 +239,8 @@ // Complete all decls we collected until now. while (!m_decls_to_complete.empty()) { - NamedDecl *decl = *m_decls_to_complete.begin(); - + NamedDecl *decl = m_decls_to_complete.pop_back_val(); m_decls_already_completed.insert(decl); - m_decls_to_complete.erase(decl); // We should only complete decls coming from the source context. assert(to_context_md->m_origins[decl].ctx == m_src_ctx); @@ -287,7 +285,7 @@ // Check if we already completed this type. if (m_decls_already_completed.count(to_named_decl) != 0) return; - m_decls_to_complete.insert(to_named_decl); + m_decls_to_complete.push_back(to_named_decl); } }; } // namespace
Index: lldb/source/Symbol/ClangASTImporter.cpp =================================================================== --- lldb/source/Symbol/ClangASTImporter.cpp +++ lldb/source/Symbol/ClangASTImporter.cpp @@ -214,7 +214,7 @@ /// imported while completing the original Decls). class CompleteTagDeclsScope : public ClangASTImporter::NewDeclListener { ClangASTImporter::ImporterDelegateSP m_delegate; - llvm::SmallPtrSet<NamedDecl *, 32> m_decls_to_complete; + llvm::SmallVector<NamedDecl *, 32> m_decls_to_complete; llvm::SmallPtrSet<NamedDecl *, 32> m_decls_already_completed; clang::ASTContext *m_dst_ctx; clang::ASTContext *m_src_ctx; @@ -239,10 +239,8 @@ // Complete all decls we collected until now. while (!m_decls_to_complete.empty()) { - NamedDecl *decl = *m_decls_to_complete.begin(); - + NamedDecl *decl = m_decls_to_complete.pop_back_val(); m_decls_already_completed.insert(decl); - m_decls_to_complete.erase(decl); // We should only complete decls coming from the source context. assert(to_context_md->m_origins[decl].ctx == m_src_ctx); @@ -287,7 +285,7 @@ // Check if we already completed this type. if (m_decls_already_completed.count(to_named_decl) != 0) return; - m_decls_to_complete.insert(to_named_decl); + m_decls_to_complete.push_back(to_named_decl); } }; } // namespace
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits