summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Windows/Program.inc
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2014-11-04 08:17:15 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2014-11-04 08:17:15 +0000
commit72e626e3053c741f1c7df9b8ca77566fedc3f5d7 (patch)
tree659783eae4da0abb938ac2db5158752e6fa97a9b /llvm/lib/Support/Windows/Program.inc
parentb925715c561d9f4799dcda5d898a0b8785c1b6b6 (diff)
downloadbcm5719-llvm-72e626e3053c741f1c7df9b8ca77566fedc3f5d7.tar.gz
bcm5719-llvm-72e626e3053c741f1c7df9b8ca77566fedc3f5d7.zip
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? llvm-svn: 221246
Diffstat (limited to 'llvm/lib/Support/Windows/Program.inc')
-rw-r--r--llvm/lib/Support/Windows/Program.inc1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Support/Windows/Program.inc b/llvm/lib/Support/Windows/Program.inc
index 5755b0ad035..942dfda99c9 100644
--- a/llvm/lib/Support/Windows/Program.inc
+++ b/llvm/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;
OpenPOWER on IntegriCloud