[llvm-bugs] Why utf convertion functions requires output buffer to be empty?

Reid Kleckner via llvm-bugs llvm-bugs at lists.llvm.org
Fri Nov 20 11:15:11 PST 2015


You can probably relax it if you like.

On Thu, Nov 19, 2015 at 9:49 PM, Xpol Wan via llvm-bugs <
llvm-bugs at lists.llvm.org> wrote:

>
> The function convertUTF16ToUTF8String and convertUTF8ToUTF16String defined
> in lib/Support/ConvertUTFWrapper.cpp has an assertion that out buffer
> should be empty.
>
> But why is these assertion necessary?
>
> see:
>
>
> https://github.com/llvm-mirror/llvm/blob/master/lib/Support/ConvertUTFWrapper.cpp#L85
>
> https://github.com/llvm-mirror/llvm/blob/master/lib/Support/ConvertUTFWrapper.cpp#L135
>
> Best Regards!
>
> Xpol Wan
> // There is a better way!
>
> _______________________________________________
> llvm-bugs mailing list
> llvm-bugs at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20151120/d8774e0d/attachment.html>


More information about the llvm-bugs mailing list