[llvm] r265030 - [PGO] use emplace_back. NFC.

Rong Xu via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 31 10:39:34 PDT 2016


Author: xur
Date: Thu Mar 31 12:39:33 2016
New Revision: 265030

URL: http://llvm.org/viewvc/llvm-project?rev=265030&view=rev
Log:
[PGO] use emplace_back. NFC.

Use emplace_back instead of push_back for simplicity.




Modified:
    llvm/trunk/lib/ProfileData/InstrProf.cpp

Modified: llvm/trunk/lib/ProfileData/InstrProf.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/InstrProf.cpp?rev=265030&r1=265029&r2=265030&view=diff
==============================================================================
--- llvm/trunk/lib/ProfileData/InstrProf.cpp (original)
+++ llvm/trunk/lib/ProfileData/InstrProf.cpp Thu Mar 31 12:39:33 2016
@@ -180,7 +180,7 @@ void InstrProfSymtab::create(Module &M,
       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();




More information about the llvm-commits mailing list