From 0c96daabadeb9bd580a6ec7639dc607925a5c904 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 28 Jul 2009 23:25:18 +0000 Subject: 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 --- llvm/lib/System/Unix/Program.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/System/Unix') 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 -- cgit v1.2.3