From: Nathan Slingerland Date: Wed, 18 Nov 2015 17:10:24 +0000 (+0000) Subject: [llvm-profdata] Use SmallSet rather that std::set for keeping track of profdata merge... X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=991a399fac02f6483f6785b6035ef09cc68db6d0;hp=444e864c879c605a0bccc15d1028261fefdcc0bf;p=oota-llvm.git [llvm-profdata] Use SmallSet rather that std::set for keeping track of profdata merge errors Missed bit of feedback from D14720. Use SmallSet rather than std::set<...> in order to be more efficient. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253474 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/llvm-profdata/llvm-profdata.cpp b/tools/llvm-profdata/llvm-profdata.cpp index 9ce0485fb13..9669c7dfa45 100644 --- a/tools/llvm-profdata/llvm-profdata.cpp +++ b/tools/llvm-profdata/llvm-profdata.cpp @@ -11,6 +11,7 @@ // //===----------------------------------------------------------------------===// +#include "llvm/ADT/SmallSet.h" #include "llvm/ADT/StringRef.h" #include "llvm/IR/LLVMContext.h" #include "llvm/ProfileData/InstrProfReader.h" @@ -27,8 +28,6 @@ #include "llvm/Support/Signals.h" #include "llvm/Support/raw_ostream.h" -#include - using namespace llvm; static void exitWithError(const Twine &Message, @@ -103,7 +102,7 @@ static void mergeInstrProfile(const cl::list &Inputs, exitWithErrorCode(EC, OutputFilename); InstrProfWriter Writer; - std::set WriterErrorCodes; + SmallSet WriterErrorCodes; for (const auto &Filename : Inputs) { auto ReaderOrErr = InstrProfReader::create(Filename); if (std::error_code ec = ReaderOrErr.getError())