From 8320a1753f044a7762cae23b8b2e0bb96c74edab Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Fri, 10 Nov 2017 19:12:01 +0000 Subject: [PATCH] Use DenseMap instead of std::map in fixupExports Some DLLs have many exports, and this data structure shows up in the profile of linking content.dll. llvm-svn: 317910 --- lld/COFF/DriverUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lld/COFF/DriverUtils.cpp b/lld/COFF/DriverUtils.cpp index c03b972..6485699 100644 --- a/lld/COFF/DriverUtils.cpp +++ b/lld/COFF/DriverUtils.cpp @@ -594,7 +594,7 @@ void fixupExports() { } // Uniquefy by name. - std::map Map; + DenseMap Map(Config->Exports.size()); std::vector V; for (Export &E : Config->Exports) { auto Pair = Map.insert(std::make_pair(E.ExportName, &E)); -- 2.7.4