summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2014-11-13 22:09:56 +0000
committerReid Kleckner <reid@kleckner.net>2014-11-13 22:09:56 +0000
commit4a78699c8ca7ed3be1e4f83fc50b13cbaa66c82b (patch)
tree1cf366e7edd4dc09caa631519dd3762dccc84b24
parentfcacc74c7247ae4112bee01719c957dd7093198d (diff)
downloadbcm5719-llvm-4a78699c8ca7ed3be1e4f83fc50b13cbaa66c82b.tar.gz
bcm5719-llvm-4a78699c8ca7ed3be1e4f83fc50b13cbaa66c82b.zip
Avoid usage of char16_t as MSVC "14" doesn't appear to support it
Fixes the MSVC "14" build. llvm-svn: 221932
-rw-r--r--llvm/lib/Support/Windows/Program.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Support/Windows/Program.inc b/llvm/lib/Support/Windows/Program.inc
index 1f4270c948e..72c2a58688d 100644
--- a/llvm/lib/Support/Windows/Program.inc
+++ b/llvm/lib/Support/Windows/Program.inc
@@ -39,13 +39,13 @@ ErrorOr<std::string> sys::findProgramByName(StringRef Name,
if (Name.find_first_of("/\\") != StringRef::npos)
return std::string(Name);
- const char16_t *Path = nullptr;
- std::u16string PathStorage;
+ const wchar_t *Path = nullptr;
+ std::wstring PathStorage;
if (!Paths.empty()) {
PathStorage.reserve(Paths.size() * MAX_PATH);
for (unsigned i = 0; i < Paths.size(); ++i) {
if (i)
- PathStorage.push_back(';');
+ PathStorage.push_back(L';');
StringRef P = Paths[i];
SmallVector<wchar_t, MAX_PATH> TmpPath;
if (std::error_code EC = windows::UTF8ToUTF16(P, TmpPath))
@@ -73,7 +73,7 @@ ErrorOr<std::string> sys::findProgramByName(StringRef Name,
do {
U16Result.reserve(Len);
- Len = ::SearchPathW((const wchar_t *)Path, c_str(U16Name),
+ Len = ::SearchPathW(Path, c_str(U16Name),
U16Ext.empty() ? nullptr : c_str(U16Ext),
U16Result.capacity(), U16Result.data(), nullptr);
} while (Len > U16Result.capacity());
OpenPOWER on IntegriCloud