[lld] fe1f0a1 - [LLD] Fix /time formatting for very long runs. NFC.

Alexandre Ganea via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 2 06:54:07 PDT 2020


Author: Alexandre Ganea
Date: 2020-10-02T09:53:43-04:00
New Revision: fe1f0a1a19011154c73b9f6ab764c39dac9b4e79

URL: https://github.com/llvm/llvm-project/commit/fe1f0a1a19011154c73b9f6ab764c39dac9b4e79
DIFF: https://github.com/llvm/llvm-project/commit/fe1f0a1a19011154c73b9f6ab764c39dac9b4e79.diff

LOG: [LLD] Fix /time formatting for very long runs. NFC.

Added: 
    

Modified: 
    lld/Common/Timer.cpp

Removed: 
    


################################################################################
diff  --git a/lld/Common/Timer.cpp b/lld/Common/Timer.cpp
index ea221fd86f3e..16c518e4bf84 100644
--- a/lld/Common/Timer.cpp
+++ b/lld/Common/Timer.cpp
@@ -45,7 +45,7 @@ void Timer::print() {
     if (child->total > 0)
       child->print(1, totalDuration);
 
-  message(std::string(49, '-'));
+  message(std::string(50, '-'));
 
   root().print(0, root().millis(), false);
 }
@@ -62,7 +62,7 @@ void Timer::print(int depth, double totalDuration, bool recurse) const {
   SmallString<32> str;
   llvm::raw_svector_ostream stream(str);
   std::string s = std::string(depth * 2, ' ') + name + std::string(":");
-  stream << format("%-30s%5d ms (%5.1f%%)", s.c_str(), (int)millis(), p);
+  stream << format("%-30s%7d ms (%5.1f%%)", s.c_str(), (int)millis(), p);
 
   message(str);
 


        


More information about the llvm-commits mailing list