[PATCH] PR 17421: Implemented -save-temps={obj|cwd} option

Artem Belevich tra at google.com
Mon Feb 2 10:57:51 PST 2015


I've updated the patch.


================
Comment at: include/clang/Driver/Driver.h:72
@@ +71,3 @@
+      // Diag - Forwarding function for diagnostics.
+      DiagnosticBuilder
+      Diag(unsigned DiagID) const {
----------------
rnk wrote:
> Any reason for this whitespace change?
It was unintentional. Undone.

================
Comment at: lib/Driver/Driver.cpp:372
@@ +371,3 @@
+                    .Case("obj", SaveTempsObj)
+                    .Default(SaveTempsCwd); // Should we complain here instead?
+  }
----------------
rnk wrote:
> Not worth it, IMO.
OK. I've removed the comment.

================
Comment at: lib/Driver/Driver.cpp:1793
@@ +1792,3 @@
+    SmallString<256> Result;
+    if (isSaveTempsObj() && C.getArgs().hasArg(options::OPT_o)) {
+      Arg *FinalOutput = C.getArgs().getLastArg(options::OPT_o);
----------------
rnk wrote:
> No need to check isSaveTempsObj(), we already know it, right?
Indeed. And both ifs can be collapsed into one.

http://reviews.llvm.org/D7304

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list