mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-11 05:16:19 +03:00
fix building against recent LLVM 4.0
This commit is contained in:
parent
47e1251298
commit
8f0f29c239
3 changed files with 20 additions and 4 deletions
|
@ -66,6 +66,9 @@ static bool ReadPathFromRegistry(llvm::SmallString<128> &p) {
|
|||
if (RegGetValue(hkey, NULL, _T("Path"), RRF_RT_REG_SZ, NULL, data, &length) ==
|
||||
ERROR_SUCCESS) {
|
||||
#if UNICODE
|
||||
#if LDC_LLVM_VER >= 400
|
||||
using UTF16 = llvm::UTF16;
|
||||
#endif
|
||||
std::string out;
|
||||
res = llvm::convertUTF16ToUTF8String(
|
||||
llvm::ArrayRef<UTF16>(reinterpret_cast<UTF16 *>(data), length), out);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue