[llvm-commits] [llvm] r117596 - /llvm/trunk/lib/System/Unix/Program.inc

Dan Gohman gohman at apple.com
Thu Oct 28 13:34:33 PDT 2010


Author: djg
Date: Thu Oct 28 15:34:33 2010
New Revision: 117596

URL: http://llvm.org/viewvc/llvm-project?rev=117596&view=rev
Log:
Revert r117582, which reverted r77396. Searching PATH for a string
which contains slashes is inconsistent with the meaning of PATH on
Unix-type platforms, and pretty surprising.

If the user has given a specific path to execute and we can't
execute it, we should fail and say why.  (Apparently the new
posix_spawn code doesn't always say why, but that's a separate
issue.)

Modified:
    llvm/trunk/lib/System/Unix/Program.inc

Modified: llvm/trunk/lib/System/Unix/Program.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Unix/Program.inc?rev=117596&r1=117595&r2=117596&view=diff
==============================================================================
--- llvm/trunk/lib/System/Unix/Program.inc (original)
+++ llvm/trunk/lib/System/Unix/Program.inc Thu Oct 28 15:34:33 2010
@@ -63,7 +63,7 @@
     return Path();
   // Use the given path verbatim if it contains any slashes; this matches
   // the behavior of sh(1) and friends.
-  if (progName.find('/') != std::string::npos && temp.canExecute())
+  if (progName.find('/') != std::string::npos)
     return temp;
 
   // At this point, the file name does not contain slashes. Search for it





More information about the llvm-commits mailing list