[cfe-commits] r140889 - in /cfe/trunk: docs/tools/clang.pod include/clang/Driver/Options.td lib/Driver/Driver.cpp test/Driver/working-directory.c

Daniel Dunbar daniel at zuster.org
Fri Sep 30 14:33:09 PDT 2011


Author: ddunbar
Date: Fri Sep 30 16:33:09 2011
New Revision: 140889

URL: http://llvm.org/viewvc/llvm-project?rev=140889&view=rev
Log:
Revert my --working-directory option, which wasn't well thought through.

Removed:
    cfe/trunk/test/Driver/working-directory.c
Modified:
    cfe/trunk/docs/tools/clang.pod
    cfe/trunk/include/clang/Driver/Options.td
    cfe/trunk/lib/Driver/Driver.cpp

Modified: cfe/trunk/docs/tools/clang.pod
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/tools/clang.pod?rev=140889&r1=140888&r2=140889&view=diff
==============================================================================
--- cfe/trunk/docs/tools/clang.pod (original)
+++ cfe/trunk/docs/tools/clang.pod Fri Sep 30 16:33:09 2011
@@ -407,13 +407,6 @@
 
 Show commands to run and use verbose output.
 
-=item B<--working-directory>
-
-Use the given argument as the effective working directory to run the compiler
-in. This is useful for running the compiler as if in a specific working
-directory without the overhead of having to change directory using an auxiliary
-process.
-
 =back
 
 

Modified: cfe/trunk/include/clang/Driver/Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=140889&r1=140888&r2=140889&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Fri Sep 30 16:33:09 2011
@@ -855,8 +855,6 @@
 def _version : Flag<"--version">;
 def _warn__EQ : Joined<"--warn-=">, Alias<W_Joined>;
 def _warn_ : Joined<"--warn-">, Alias<W_Joined>;
-def _working_directory : Separate<"--working-directory">,
-    HelpText<"Use the given argument as the effective working directory">;
 def _write_dependencies : Flag<"--write-dependencies">, Alias<MD>;
 def _write_user_dependencies : Flag<"--write-user-dependencies">, Alias<MMD>;
 def _ : Joined<"--">, Flags<[Unsupported]>;

Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=140889&r1=140888&r2=140889&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Fri Sep 30 16:33:09 2011
@@ -38,7 +38,6 @@
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/Path.h"
 #include "llvm/Support/Program.h"
-#include "llvm/Support/Process.h"
 
 #include "InputInfo.h"
 
@@ -324,13 +323,6 @@
   if (Args->hasArg(options::OPT_nostdlib))
     UseStdLib = false;
 
-  // Honor --working-directory. Eventually we want to handle this completely
-  // internally to support good use as a library, but for now we just change our
-  // working directory.
-  if (const Arg *A = Args->getLastArg(options::OPT__working_directory)) {
-    llvm::sys::Process::SetWorkingDirectory(A->getValue(*Args));
-  }
-
   Host = GetHostInfo(DefaultHostTriple.c_str());
 
   // Perform the default argument translations.

Removed: cfe/trunk/test/Driver/working-directory.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/working-directory.c?rev=140888&view=auto
==============================================================================
--- cfe/trunk/test/Driver/working-directory.c (original)
+++ cfe/trunk/test/Driver/working-directory.c (removed)
@@ -1,3 +0,0 @@
-// RUN: touch %t.h
-// RUN: echo '#include "%t.h"' > %t.c
-// RUN: %clang --working-directory %t -fsyntax-only %t.c





More information about the cfe-commits mailing list