]> granicus.if.org Git - clang/commitdiff
Revert r114712 due to failure on darwin buildbot.
authorNick Lewycky <nicholas@mxc.ca>
Fri, 24 Sep 2010 00:46:53 +0000 (00:46 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Fri, 24 Sep 2010 00:46:53 +0000 (00:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114713 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Driver.cpp

index 84a33a5f7763974fa85aea001f7202428a3b8657..0555342bc84a489478c700fb5537d00e6a604a85 100644 (file)
@@ -1151,22 +1151,16 @@ const char *Driver::GetNamedOutputPath(Compilation &C,
                                        const char *BaseInput,
                                        bool AtTopLevel) const {
   llvm::PrettyStackTraceString CrashInfo("Computing output path");
-
-  // Default to writing to stdout.
-  if (AtTopLevel && isa<PreprocessJobAction>(JA)) {
-    if (Arg *DepOutput = C.getArgs().getLastArg(options::OPT_MF))
-      return C.addResultFile(DepOutput->getValue(C.getArgs()));
-    if (Arg *FinalOutput = C.getArgs().getLastArg(options::OPT_o))
-      return C.addResultFile(FinalOutput->getValue(C.getArgs()));
-    return "-";
-  }
-
   // Output to a user requested destination?
   if (AtTopLevel && !isa<DsymutilJobAction>(JA)) {
     if (Arg *FinalOutput = C.getArgs().getLastArg(options::OPT_o))
       return C.addResultFile(FinalOutput->getValue(C.getArgs()));
   }
 
+  // Default to writing to stdout?
+  if (AtTopLevel && isa<PreprocessJobAction>(JA))
+    return "-";
+
   // Output to a temporary file?
   if (!AtTopLevel && !C.getArgs().hasArg(options::OPT_save_temps)) {
     std::string TmpName =