diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2010-09-02 03:46:04 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2010-09-02 03:46:04 +0000 |
commit | 4fa39acb5323ba1c83587bb30b818e6593258c65 (patch) | |
tree | b59f9e0e75040fb5e4748200343e93e4fe9eb4fc /llvm/lib/Support/SystemUtils.cpp | |
parent | a224e5563e54a265b0e8feca3afb70de3501c93b (diff) | |
download | llvm-4fa39acb5323ba1c83587bb30b818e6593258c65.zip llvm-4fa39acb5323ba1c83587bb30b818e6593258c65.tar.gz llvm-4fa39acb5323ba1c83587bb30b818e6593258c65.tar.bz2 |
llvm::FindExecutable(): Retrieve the name with suffix.exe, if available.
bugpoint uses it.
llvm-svn: 112803
Diffstat (limited to 'llvm/lib/Support/SystemUtils.cpp')
-rw-r--r-- | llvm/lib/Support/SystemUtils.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Support/SystemUtils.cpp b/llvm/lib/Support/SystemUtils.cpp index 299032f..421b381 100644 --- a/llvm/lib/Support/SystemUtils.cpp +++ b/llvm/lib/Support/SystemUtils.cpp @@ -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(); |