summaryrefslogtreecommitdiff
path: root/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
commit1b68af4183d20ccd9de8035ab8812a4d88827f88 (patch)
tree6416983774da0f12092a04edc081655f1e347e57 /lib/Support/SystemUtils.cpp
parentb51633b476b9d4bb62f9b92fe37a777423b0589a (diff)
downloadllvm-1b68af4183d20ccd9de8035ab8812a4d88827f88.tar.gz
llvm-1b68af4183d20ccd9de8035ab8812a4d88827f88.tar.bz2
llvm-1b68af4183d20ccd9de8035ab8812a4d88827f88.tar.xz
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
Diffstat (limited to 'lib/Support/SystemUtils.cpp')
-rw-r--r--lib/Support/SystemUtils.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Support/SystemUtils.cpp b/lib/Support/SystemUtils.cpp
index 299032f187..421b38111e 100644
--- a/lib/Support/SystemUtils.cpp
+++ b/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();