Have the UTF conversion wrappers append a null terminator.
authorZachary Turner <zturner@google.com>
Mon, 26 Jan 2015 22:05:50 +0000 (22:05 +0000)
committerZachary Turner <zturner@google.com>
Mon, 26 Jan 2015 22:05:50 +0000 (22:05 +0000)
commitb9a39da95e734d78d23a567fd8b3704900408aa8
tree501444c1b6b0848a02c44c374bff1643af30ef1f
parent3ba85ab23a68a494d2c72310378eae10d10b37e0
Have the UTF conversion wrappers append a null terminator.

This is especially useful for the UTF8 -> UTF16 direction, since
there is no equivalent of llvm::SmallString<> for wide characters.
This means that anyone who wants a null terminated string is forced
to manually push and pop their own null terminator.

Reviewed by: Reid Kleckner.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227143 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/ConvertUTFWrapper.cpp