File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -444,6 +444,7 @@ UnifiedStatsReporter::printAlwaysOnStatsAndTimers(raw_ostream &OS) {
444
444
}
445
445
// Print timers.
446
446
TimerGroup::printAllJSONValues (OS, delim);
447
+ TimerGroup::clearAll ();
447
448
OS << " \n }\n " ;
448
449
OS.flush ();
449
450
}
@@ -664,6 +665,7 @@ UnifiedStatsReporter::~UnifiedStatsReporter()
664
665
#if !defined(NDEBUG) || defined(LLVM_ENABLE_STATS)
665
666
publishAlwaysOnStatsToLLVM ();
666
667
PrintStatisticsJSON (ostream);
668
+ TimerGroup::clearAll ();
667
669
#else
668
670
printAlwaysOnStatsAndTimers (ostream);
669
671
#endif
Original file line number Diff line number Diff line change 24
24
// RUN: %{python} %utils/process-stats-dir.py --compare-to-csv-baseline %t/driver.csv %t
25
25
26
26
// RUN: %target-swiftc_driver -c -o %t/out.o -stats-output-dir %t/this/is/not/a/directory %s 2>&1 | %FileCheck -check-prefix=CHECK-NODIR %s
27
+ // RUN: %target-swiftc_driver -c -o %t/out.o -stats-output-dir %t %s 2>&1 | %FileCheck -allow-empty -check-prefix=CHECK-SILENT %s
27
28
28
29
// CHECK: {{"AST.NumSourceLines" [1-9][0-9]*$}}
29
30
// CHECK: {{"IRModule.NumIRFunctions" [1-9][0-9]*$}}
30
31
// CHECK: {{"LLVM.NumLLVMBytesOutput" [1-9][0-9]*$}}
31
32
32
33
// CHECK-NODIR: {{Error opening -stats-output-dir file}}
33
34
35
+ // CHECK-SILENT-NOT: {{---}}
36
+
34
37
public func foo( ) {
35
38
print ( " hello " )
36
39
}
You can’t perform that action at this time.
0 commit comments