[PATCH] D24820: Add -stats-file option

Adrian Prantl via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 22 08:49:06 PDT 2016


aprantl added inline comments.

================
Comment at: include/clang/Basic/DiagnosticFrontendKinds.td:111
@@ -110,1 +110,3 @@
+def warn_fe_unable_to_open_stats_file : Warning<
+    "unable to open statistic output file '%0': '%1'">;
 def err_fe_no_pch_in_dir : Error<
----------------
statstic"s"? not sure.

================
Comment at: lib/Driver/Tools.cpp:6093
@@ -6092,1 +6092,3 @@
 
+  // Setup statistic file output.
+  if (const Arg *A = Args.getLastArg(options::OPT_save_stats_EQ)) {
----------------
ditto :-)

================
Comment at: test/Driver/save-stats.c:12
@@ +11,3 @@
+// RUN: %clang -target x86_64-apple-darwin -save-stats=obj -c -o obj/dir/save-stats.o %s -### 2>&1 | FileCheck %s -check-prefix=CHECK-OBJ
+// CHECK-OBJ: "-stats-file=obj/dir{{/|\\\\}}save-stats.stats"
+// CHECK-OBJ: "-o" "obj/dir{{/|\\\\}}save-stats.o"
----------------
This is up to taste, but just accepting {{.}} as the path separator would be sufficient IMO and might be more readable.


Repository:
  rL LLVM

https://reviews.llvm.org/D24820





More information about the cfe-commits mailing list