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
This commit is contained in:
NAKAMURA Takumi 2014-11-04 08:17:15 +00:00
parent ab15115ee0
commit 8f129a446d

View File

@ -100,6 +100,7 @@ ErrorOr<std::string> sys::findProgramByName(StringRef Name,
SmallVector<StringRef, 12> PathExts;
PathExts.push_back("");
PathExts.push_back(".exe"); // FIXME: This must be in %PATHEXT%.
SplitString(std::getenv("PATHEXT"), PathExts, ";");
SmallVector<wchar_t, MAX_PATH> U16Result;