#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/ConvertUTF.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/SwapByteOrder.h"
#include <string>
#include <vector>
namespace llvm {
bool ConvertUTF8toWide(unsigned WideCharWidth, llvm::StringRef Source,
char *&ResultPtr, const UTF8 *&ErrorPtr) { … }
bool ConvertCodePointToUTF8(unsigned Source, char *&ResultPtr) { … }
bool hasUTF16ByteOrderMark(ArrayRef<char> S) { … }
bool convertUTF16ToUTF8String(ArrayRef<char> SrcBytes, std::string &Out) { … }
bool convertUTF16ToUTF8String(ArrayRef<UTF16> Src, std::string &Out) { … }
bool convertUTF32ToUTF8String(ArrayRef<char> SrcBytes, std::string &Out) { … }
bool convertUTF32ToUTF8String(ArrayRef<UTF32> Src, std::string &Out) { … }
bool convertUTF8ToUTF16String(StringRef SrcUTF8,
SmallVectorImpl<UTF16> &DstUTF16) { … }
static_assert …;
template <typename TResult>
static inline bool ConvertUTF8toWideInternal(llvm::StringRef Source,
TResult &Result) { … }
bool ConvertUTF8toWide(llvm::StringRef Source, std::wstring &Result) { … }
bool ConvertUTF8toWide(const char *Source, std::wstring &Result) { … }
bool convertWideToUTF8(const std::wstring &Source, std::string &Result) { … }
}