[llvm] r316301 - Create fewer copies of StringMaps. No functionality change intended.

Benjamin Kramer via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 22 13:16:28 PDT 2017


Author: d0k
Date: Sun Oct 22 13:16:28 2017
New Revision: 316301

URL: http://llvm.org/viewvc/llvm-project?rev=316301&view=rev
Log:
Create fewer copies of StringMaps. No functionality change intended.

Modified:
    llvm/trunk/include/llvm/ProfileData/SampleProf.h

Modified: llvm/trunk/include/llvm/ProfileData/SampleProf.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ProfileData/SampleProf.h?rev=316301&r1=316300&r2=316301&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ProfileData/SampleProf.h (original)
+++ llvm/trunk/include/llvm/ProfileData/SampleProf.h Sun Oct 22 13:16:28 2017
@@ -372,7 +372,7 @@ public:
           if (!Callee || !Callee->getSubprogram())
             S.insert(Function::getGUID(TS.getKey()));
         }
-    for (auto CS : CallsiteSamples)
+    for (const auto &CS : CallsiteSamples)
       for (const auto &NameFS : CS.second)
         NameFS.second.findImportedFunctions(S, M, Threshold);
   }




More information about the llvm-commits mailing list