aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/SystemUtils.cpp
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2010-09-02 03:46:04 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2010-09-02 03:46:04 +0000
commit4fa39acb5323ba1c83587bb30b818e6593258c65 (patch)
treeb59f9e0e75040fb5e4748200343e93e4fe9eb4fc /llvm/lib/Support/SystemUtils.cpp
parenta224e5563e54a265b0e8feca3afb70de3501c93b (diff)
downloadllvm-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.cpp4
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();