summaryrefslogtreecommitdiff
path: root/lib/Support/SystemUtils.cpp
diff options
context:
space:
mode:
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();