diff --git a/lld/MachO/UnwindInfoSection.cpp b/lld/MachO/UnwindInfoSection.cpp --- a/lld/MachO/UnwindInfoSection.cpp +++ b/lld/MachO/UnwindInfoSection.cpp @@ -146,7 +146,7 @@ Symbol *canonicalizePersonality(Symbol *); uint64_t unwindInfoSize = 0; - std::vector symbolsVec; + SmallVector symbolsVec; CompactUnwindLayout cuLayout; std::vector> commonEncodings; EncodingMap commonEncodingIndexes; diff --git a/llvm/include/llvm/ADT/MapVector.h b/llvm/include/llvm/ADT/MapVector.h --- a/llvm/include/llvm/ADT/MapVector.h +++ b/llvm/include/llvm/ADT/MapVector.h @@ -10,7 +10,7 @@ /// This file implements a map that provides insertion order iteration. The /// interface is purposefully minimal. The key is assumed to be cheap to copy /// and 2 copies are kept, one for indexing in a DenseMap, one for iteration in -/// a std::vector. +/// a SmallVector. /// //===----------------------------------------------------------------------===// @@ -24,16 +24,15 @@ #include #include #include -#include namespace llvm { /// This class implements a map that also provides access to all stored values -/// in a deterministic order. The values are kept in a std::vector and the +/// in a deterministic order. The values are kept in a SmallVector<*, 0> and the /// mapping is done with DenseMap from Keys to indexes in that vector. -template, - typename VectorType = std::vector>> +template , + typename VectorType = SmallVector, 0>> class MapVector { MapType Map; VectorType Vector; diff --git a/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp b/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp --- a/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp +++ b/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp @@ -266,7 +266,9 @@ unsigned NumInsts = 0; // Map from callee ValueId to profile count. Used to accumulate profile // counts for all static calls to a given callee. - MapVector CallGraphEdges; + MapVector, + std::vector>> + CallGraphEdges; SetVector RefEdges, LoadRefEdges, StoreRefEdges; SetVector TypeTests; SetVector TypeTestAssumeVCalls,