[PATCH] Refactor Compilation::PrintJob and PrintDiagnosticJob into Job::Print

Reid Kleckner rnk at google.com
Thu Sep 12 10:52:59 PDT 2013


  LGTM


================
Comment at: lib/Driver/Driver.cpp:444
@@ -443,3 +443,3 @@
   if (FailingCommand)
-    C.PrintDiagnosticJob(OS, *FailingCommand);
+    FailingCommand->Print(OS, "\n", /*Quote*/ false, /*CrashReportFlagsOnly*/ true);
   else
----------------
This is 84 cols?  Also, you named the bool "CrashReport", not "CrashReportFlagsOnly".

================
Comment at: lib/Driver/Job.cpp:31
@@ +30,3 @@
+  // arguments.  Therefore, we need to skip the flag and the next argument.
+  bool Res = llvm::StringSwitch<bool>(Flag)
+    .Cases("-I", "-MF", "-MT", "-MQ", true)
----------------
Ouch.  Can we get this from Options.td, perhaps in a future change?


http://llvm-reviews.chandlerc.com/D1653



More information about the cfe-commits mailing list