[llvm] r221246 - sys::findProgramByName(): [Win32] Tweak to pass lowercase .exe to SearchPath() to appease clang Driver's tests.
NAKAMURA Takumi
geek4civic at gmail.com
Tue Nov 4 00:17:16 PST 2014
Author: chapuni
Date: Tue Nov 4 02:17:15 2014
New Revision: 221246
URL: http://llvm.org/viewvc/llvm-project?rev=221246&view=rev
Log:
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?
Modified:
llvm/trunk/lib/Support/Windows/Program.inc
Modified: llvm/trunk/lib/Support/Windows/Program.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Program.inc?rev=221246&r1=221245&r2=221246&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Windows/Program.inc (original)
+++ llvm/trunk/lib/Support/Windows/Program.inc Tue Nov 4 02:17:15 2014
@@ -100,6 +100,7 @@ ErrorOr<std::string> sys::findProgramByN
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;
More information about the llvm-commits
mailing list