OSDN Git Service

[PGO] use emplace_back. NFC.
authorRong Xu <xur@google.com>
Thu, 31 Mar 2016 17:39:33 +0000 (17:39 +0000)
committerRong Xu <xur@google.com>
Thu, 31 Mar 2016 17:39:33 +0000 (17:39 +0000)
Use emplace_back instead of push_back for simplicity.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265030 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ProfileData/InstrProf.cpp

index fa15170..4a023f7 100644 (file)
@@ -180,7 +180,7 @@ void InstrProfSymtab::create(Module &M, bool InLTO) {
       continue;
     const std::string &PGOFuncName = getPGOFuncName(F, InLTO);
     addFuncName(PGOFuncName);
-    MD5FuncMap.push_back(std::make_pair(Function::getGUID(PGOFuncName), &F));
+    MD5FuncMap.emplace_back(Function::getGUID(PGOFuncName), &F);
   }
 
   finalizeSymtab();