[PATCH] D32512: [gcov] Sort file info before printing it

Scott Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 25 17:23:00 PDT 2017


scott.smith accepted this revision.
scott.smith added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lib/IR/GCOV.cpp:592
                      StringRef GCNOFile, StringRef GCDAFile) {
-  for (const auto &LI : LineInfo) {
-    StringRef Filename = LI.first();
+  SmallVector<StringRef, 4> Filenames;
+  for (const auto &LI : LineInfo)
----------------
Personally I wouldn't bother with SmallVector; you'll probably get more mileage just specifying how many entries to expect by calling vector::reserve(LineInfo.size()).

I'm sure it's all noise either way though.


https://reviews.llvm.org/D32512





More information about the llvm-commits mailing list