From: NAKAMURA Takumi Date: Tue, 4 Nov 2014 08:17:15 +0000 (+0000) Subject: sys::findProgramByName(): [Win32] Tweak to pass lowercase .exe to SearchPath() to... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8f129a446d72f268baaec8f5bac4805d6c75a0d8;p=oota-llvm.git sys::findProgramByName(): [Win32] Tweak to pass lowercase .exe to SearchPath() to appease clang Driver's tests. It seems SearchPath() doesn't show actual extension on the filesystem. FIXME: Shall we use FindFirstFile() here? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221246 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Support/Windows/Program.inc b/lib/Support/Windows/Program.inc index 5755b0ad035..942dfda99c9 100644 --- a/lib/Support/Windows/Program.inc +++ b/lib/Support/Windows/Program.inc @@ -100,6 +100,7 @@ ErrorOr sys::findProgramByName(StringRef Name, SmallVector PathExts; PathExts.push_back(""); + PathExts.push_back(".exe"); // FIXME: This must be in %PATHEXT%. SplitString(std::getenv("PATHEXT"), PathExts, ";"); SmallVector U16Result;