Skip to content

Commit d854e31

Browse files
committed
Address reviewer comments. Make output compatible with GCC
1 parent 10edd59 commit d854e31

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

clang/lib/Driver/Compilation.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,8 @@ int Compilation::ExecuteCommand(const Command &C,
201201
// the global static timer list which, in principle, could be cleared without
202202
// us knowing about it.
203203
llvm::TimeRecord StartTime;
204-
if (getArgs().hasArg(options::OPT_time)) {
204+
if (getArgs().hasArg(options::OPT_time))
205205
StartTime = llvm::TimeRecord::getCurrentTime(/*Start=*/true);
206-
}
207206

208207
std::string Error;
209208
bool ExecutionFailed;
@@ -216,8 +215,8 @@ int Compilation::ExecuteCommand(const Command &C,
216215
Time -= StartTime;
217216
llvm::StringRef Name = llvm::sys::path::filename(C.getExecutable());
218217
llvm::errs() << "# " << Name << " "
219-
<< llvm::format("%0.5f", Time.getUserTime()) << " "
220-
<< llvm::format("%0.5f", Time.getSystemTime()) << "\n";
218+
<< llvm::format("%0.2f", Time.getUserTime()) << " "
219+
<< llvm::format("%0.2f", Time.getSystemTime()) << "\n";
221220
}
222221

223222
if (!Error.empty()) {

0 commit comments

Comments
 (0)