llvm::FindExecutable(): Retrieve the name with suffix.exe, if available.

bugpoint uses it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112803 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
NAKAMURA Takumi 2010-09-02 03:46:04 +00:00
parent b51633b476
commit 1b68af4183

View File

@ -49,6 +49,10 @@ sys::Path llvm::FindExecutable(const std::string &ExeName,
Result.appendComponent(ExeName);
if (Result.canExecute())
return Result;
// Expect to retrieve the pathname with suffix .exe.
Result = sys::Program::FindProgramByName(Result.str());
if (!Result.empty())
return Result;
}
return sys::Path();