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
This commit is contained in:
Dan Gohman 2009-07-28 23:25:18 +00:00
parent 1fc3a20ccf
commit 0c96daabad
1 changed files with 1 additions and 1 deletions
llvm/lib/System/Unix

View File

@ -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