projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab15115
)
sys::findProgramByName(): [Win32] Tweak to pass lowercase .exe to SearchPath() to...
author
NAKAMURA Takumi
<geek4civic@gmail.com>
Tue, 4 Nov 2014 08:17:15 +0000
(08:17 +0000)
committer
NAKAMURA Takumi
<geek4civic@gmail.com>
Tue, 4 Nov 2014 08:17:15 +0000
(08:17 +0000)
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
lib/Support/Windows/Program.inc
patch
|
blob
|
history
diff --git
a/lib/Support/Windows/Program.inc
b/lib/Support/Windows/Program.inc
index 5755b0ad035b18fc3ab3241d24647b3842ad888e..942dfda99c9841811a0bbf6ef64b9f780694423a 100644
(file)
--- a/
lib/Support/Windows/Program.inc
+++ b/
lib/Support/Windows/Program.inc
@@
-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;