Skip to content

Commit ce58922

Browse files
committed
Remove new flag, adjust test
1 parent 58056a4 commit ce58922

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

clang/test/ClangScanDeps/print-timing.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
// RUN: clang-scan-deps -compilation-database %t/cdb.json -print-timing > %t/result.json 2>%t/errs
55
// RUN: cat %t/errs | FileCheck %s
6-
// CHECK: clang-scan-deps timing: {{[0-9]+}}.{{[0-9][0-9]}}s wall, {{[0-9]+}}.{{[0-9][0-9]}}s process
6+
// CHECK: wall time [s] process time [s] instruction count
7+
// CHECK-NEXT: {{[0-9]+}}.{{([0-9]{4})}} {{[0-9]+}}.{{([0-9]{4})}} {{[0-9]+}}
78

89
//--- cdb.json
910
[]

clang/tools/clang-scan-deps/ClangScanDeps.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ static bool DeprecatedDriverCommand;
8888
static ResourceDirRecipeKind ResourceDirRecipe;
8989
static bool Verbose;
9090
static bool PrintTiming;
91-
static bool NoPrintTimingHeader;
9291
static llvm::BumpPtrAllocator Alloc;
9392
static llvm::StringSaver Saver{Alloc};
9493
static std::vector<const char *> CommandLine;
@@ -221,7 +220,6 @@ static void ParseArgs(int argc, char **argv) {
221220
}
222221

223222
PrintTiming = Args.hasArg(OPT_print_timing);
224-
NoPrintTimingHeader = Args.hasArg(OPT_no_print_timing_header);
225223

226224
Verbose = Args.hasArg(OPT_verbose);
227225

@@ -1083,10 +1081,9 @@ int clang_scan_deps_main(int argc, char **argv, const llvm::ToolContext &) {
10831081
<< NumIsLocalCalls << " isLocal() calls\n";
10841082

10851083
if (PrintTiming) {
1086-
if (!NoPrintTimingHeader)
1087-
llvm::errs() << "wall time [s]\t"
1088-
<< "process time [s]\t"
1089-
<< "instruction count\n";
1084+
llvm::errs() << "wall time [s]\t"
1085+
<< "process time [s]\t"
1086+
<< "instruction count\n";
10901087
const llvm::TimeRecord &R = T.getTotalTime();
10911088
llvm::errs() << llvm::format("%0.4f", R.getWallTime()) << "\t"
10921089
<< llvm::format("%0.4f", R.getProcessTime()) << "\t"

clang/tools/clang-scan-deps/Opts.td

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ def deprecated_driver_command : F<"deprecated-driver-command", "use a single dri
3434
defm resource_dir_recipe : Eq<"resource-dir-recipe", "How to produce missing '-resource-dir' argument">;
3535

3636
def print_timing : F<"print-timing", "Print timing information">;
37-
def no_print_timing_header : F<"no-print-timing-header", "Do not print the timing information header">;
3837

3938
def verbose : F<"v", "Use verbose output">;
4039

0 commit comments

Comments
 (0)