[PATCH] D78903: [Driver] Add option -fproc-stat-report
Serge Pavlov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 27 06:27:49 PDT 2020
sepavloff marked 4 inline comments as done.
sepavloff added inline comments.
================
Comment at: clang/lib/Driver/Driver.cpp:3772
+ C.setPostCallback([=](const Command &Cmd, int Res) {
+ const llvm::sys::ProcessStatistics &ProcStat = Cmd.getProcessStatistics();
+ if (ProcStat.isSet()) {
----------------
aganea wrote:
> Use `Optional<>` like state above, then the condition changes to:
> `if (ProcStat)`
>
> and then usage below becomes:
> `<< ", total=" << ProcStat->TotalTime.count()`
Indeed, changed accordingly.
================
Comment at: clang/lib/Driver/Driver.cpp:83
#include "llvm/Support/raw_ostream.h"
+#include <iostream>
#include <map>
----------------
tschuett wrote:
> https://llvm.org/docs/CodingStandards.html#include-iostream-is-forbidden
Thank you for the catch!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78903/new/
https://reviews.llvm.org/D78903
More information about the cfe-commits
mailing list