Author: Raphael Isemann Date: 2020-05-20T15:29:20+02:00 New Revision: aa04ce761793bfff6de398091125823476a6e924
URL: https://github.com/llvm/llvm-project/commit/aa04ce761793bfff6de398091125823476a6e924 DIFF: https://github.com/llvm/llvm-project/commit/aa04ce761793bfff6de398091125823476a6e924.diff LOG: [lldb][NFC] Minor NamespaceMap refactor Added: Modified: lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.h lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp Removed: ################################################################################ diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.h index 8cdc1a817a08..ed32eac2b4af 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.h +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.h @@ -102,8 +102,8 @@ class ClangASTImporter { // Namespace maps // - typedef std::vector<std::pair<lldb::ModuleSP, CompilerDeclContext>> - NamespaceMap; + typedef std::pair<lldb::ModuleSP, CompilerDeclContext> NamespaceMapItem; + typedef std::vector<NamespaceMapItem> NamespaceMap; typedef std::shared_ptr<NamespaceMap> NamespaceMapSP; void RegisterNamespaceMap(const clang::NamespaceDecl *decl, diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp index 7d66cc0c29f4..7d40cd0e8a0e 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp @@ -676,13 +676,11 @@ void ClangExpressionDeclMap::FindExternalVisibleDecls( LLDB_LOGV(log, " CEDM::FEVD Inspecting (NamespaceMap*){0:x} ({1} entries)", namespace_map.get(), namespace_map->size()); - for (ClangASTImporter::NamespaceMap::iterator i = namespace_map->begin(), - e = namespace_map->end(); - i != e; ++i) { + for (ClangASTImporter::NamespaceMapItem &n : *namespace_map) { LLDB_LOG(log, " CEDM::FEVD Searching namespace {0} in module {1}", - i->second.GetName(), i->first->GetFileSpec().GetFilename()); + n.second.GetName(), n.first->GetFileSpec().GetFilename()); - FindExternalVisibleDecls(context, i->first, i->second); + FindExternalVisibleDecls(context, n.first, n.second); } } else if (isa<TranslationUnitDecl>(context.m_decl_context)) { CompilerDeclContext namespace_decl; _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits