[llvm] r190423 - Add getenv() wrapper that works on multibyte environment variable.

Rui Ueyama ruiu at google.com
Tue Sep 10 14:43:34 PDT 2013


Also what I'm not very sure if that the conversion result of Windows
MultiByteToWideChar/WideCharToMultiByte is always the same as LLVM's
conversion routine's result. These should be always the same but there
could be ambiguity there.


On Tue, Sep 10, 2013 at 2:38 PM, Reid Kleckner <rnk at google.com> wrote:

> On Tue, Sep 10, 2013 at 5:31 PM, Eli Friedman <eli.friedman at gmail.com>wrote:
>
>> On Tue, Sep 10, 2013 at 12:45 PM, Rui Ueyama <ruiu at google.com> wrote:
>>
>>>  +namespace sys {
>>> +namespace windows {
>>> +error_code UTF8ToUTF16(StringRef utf8,
>>> +                       SmallVectorImpl<wchar_t> &utf16);
>>> +error_code UTF16ToUTF8(const wchar_t *utf16, size_t utf16_len,
>>> +                       SmallVectorImpl<char> &utf8);
>>> +} // end namespace windows
>>> +} // end namespace sys
>>>  } // end namespace llvm.>
>>>
>>> We already have include/llvm/Support/ConvertUTF.h; we shouldn't need
>>> Windows-specific version.
>>>
>>
> We don't have a wrapper equivalent to UTF8ToUTF16, and I didn't think it
> was worth adding one that would only be called on Windows.
>
> Only the Windows Path wrappers really need to produce UTF16, so it makes
> sense to me that they hold the functionality.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130910/d7a8783f/attachment.html>


More information about the llvm-commits mailing list