From: NAKAMURA Takumi Date: Thu, 2 Sep 2010 03:46:04 +0000 (+0000) Subject: llvm::FindExecutable(): Retrieve the name with suffix.exe, if available. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1b68af4183d20ccd9de8035ab8812a4d88827f88;p=oota-llvm.git 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 --- diff --git a/lib/Support/SystemUtils.cpp b/lib/Support/SystemUtils.cpp index 299032f1871..421b38111e0 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();