summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-10-28 20:34:33 +0000
committerDan Gohman <gohman@apple.com>2010-10-28 20:34:33 +0000
commit47215f4e04d333aa63668e077df9301144aa1a2f (patch)
treef23880a82ea8a6bfd89ae78572ee50c57aa3f4bc /llvm
parent9f414eee8c3514159757d8ea455a83e0142db68b (diff)
downloadbcm5719-llvm-47215f4e04d333aa63668e077df9301144aa1a2f.tar.gz
bcm5719-llvm-47215f4e04d333aa63668e077df9301144aa1a2f.zip
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.) llvm-svn: 117596
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/System/Unix/Program.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/System/Unix/Program.inc b/llvm/lib/System/Unix/Program.inc
index 3741bf8e6ba..110a6d14f48 100644
--- a/llvm/lib/System/Unix/Program.inc
+++ b/llvm/lib/System/Unix/Program.inc
@@ -63,7 +63,7 @@ Program::FindProgramByName(const std::string& progName) {
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
OpenPOWER on IntegriCloud