summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/Unix/Program.inc
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-07-28 23:25:18 +0000
committerDan Gohman <gohman@apple.com>2009-07-28 23:25:18 +0000
commit0c96daabadeb9bd580a6ec7639dc607925a5c904 (patch)
tree38640d5117d24eacd35c96341636b975f772165a /llvm/lib/System/Unix/Program.inc
parent1fc3a20ccf9396fb9d9a4e8eba0df887da488ea1 (diff)
downloadbcm5719-llvm-0c96daabadeb9bd580a6ec7639dc607925a5c904.tar.gz
bcm5719-llvm-0c96daabadeb9bd580a6ec7639dc607925a5c904.zip
On "Unix", if Program::FindProgramByName is given a name containing
slashes, just go with it, regardless of whether it looks like it will be executable. This follows the behavior of sh(1) more closely. llvm-svn: 77396
Diffstat (limited to 'llvm/lib/System/Unix/Program.inc')
-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 7e82ef3f935..3c5a54cffc1 100644
--- a/llvm/lib/System/Unix/Program.inc
+++ b/llvm/lib/System/Unix/Program.inc
@@ -47,7 +47,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 is valid and its not executable
OpenPOWER on IntegriCloud