LLVM 20.0.0git
Namespaces | Functions
ConvertUTFWrapper.cpp File Reference
#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>

Go to the source code of this file.

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

Functions

bool llvm::ConvertUTF8toWide (unsigned WideCharWidth, llvm::StringRef Source, char *&ResultPtr, const UTF8 *&ErrorPtr)
 Convert an UTF8 StringRef to UTF8, UTF16, or UTF32 depending on WideCharWidth.
 
bool llvm::ConvertCodePointToUTF8 (unsigned Source, char *&ResultPtr)
 Convert an Unicode code point to UTF8 sequence.
 
bool llvm::hasUTF16ByteOrderMark (ArrayRef< char > SrcBytes)
 Returns true if a blob of text starts with a UTF-16 big or little endian byte order mark.
 
bool llvm::convertUTF16ToUTF8String (ArrayRef< char > SrcBytes, std::string &Out)
 Converts a stream of raw bytes assumed to be UTF16 into a UTF8 std::string.
 
bool llvm::convertUTF16ToUTF8String (ArrayRef< UTF16 > Src, std::string &Out)
 Converts a UTF16 string into a UTF8 std::string.
 
bool llvm::convertUTF32ToUTF8String (ArrayRef< char > SrcBytes, std::string &Out)
 Converts a stream of raw bytes assumed to be UTF32 into a UTF8 std::string.
 
bool llvm::convertUTF32ToUTF8String (ArrayRef< UTF32 > Src, std::string &Out)
 Converts a UTF32 string into a UTF8 std::string.
 
bool llvm::convertUTF8ToUTF16String (StringRef SrcUTF8, SmallVectorImpl< UTF16 > &DstUTF16)
 Converts a UTF-8 string into a UTF-16 string with native endianness.
 
template<typename TResult >
static bool llvm::ConvertUTF8toWideInternal (llvm::StringRef Source, TResult &Result)
 
bool llvm::ConvertUTF8toWide (llvm::StringRef Source, std::wstring &Result)
 Converts a UTF-8 StringRef to a std::wstring.
 
bool llvm::ConvertUTF8toWide (const char *Source, std::wstring &Result)
 Converts a UTF-8 C-string to a std::wstring.
 
bool llvm::convertWideToUTF8 (const std::wstring &Source, std::string &Result)
 Converts a std::wstring to a UTF-8 encoded std::string.