LLVM 22.0.0git
ConvertUTF.cpp File Reference
#include "llvm/Support/ConvertUTF.h"
#include <assert.h>

Go to the source code of this file.

Namespaces

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

Macros

#define ConvertUTF_DISABLE_WARNINGS
#define ConvertUTF_RESTORE_WARNINGS
#define UNI_SUR_HIGH_START   (UTF32)0xD800
#define UNI_SUR_HIGH_END   (UTF32)0xDBFF
#define UNI_SUR_LOW_START   (UTF32)0xDC00
#define UNI_SUR_LOW_END   (UTF32)0xDFFF

Functions

LLVM_ABI ConversionResult llvm::ConvertUTF32toUTF16 (const UTF32 **sourceStart, const UTF32 *sourceEnd, UTF16 **targetStart, UTF16 *targetEnd, ConversionFlags flags)
LLVM_ABI ConversionResult llvm::ConvertUTF16toUTF32 (const UTF16 **sourceStart, const UTF16 *sourceEnd, UTF32 **targetStart, UTF32 *targetEnd, ConversionFlags flags)
LLVM_ABI ConversionResult llvm::ConvertUTF16toUTF8 (const UTF16 **sourceStart, const UTF16 *sourceEnd, UTF8 **targetStart, UTF8 *targetEnd, ConversionFlags flags)
LLVM_ABI ConversionResult llvm::ConvertUTF32toUTF8 (const UTF32 **sourceStart, const UTF32 *sourceEnd, UTF8 **targetStart, UTF8 *targetEnd, ConversionFlags flags)
static Boolean llvm::isLegalUTF8 (const UTF8 *source, int length)
LLVM_ABI Boolean llvm::isLegalUTF8Sequence (const UTF8 *source, const UTF8 *sourceEnd)
LLVM_ABI unsigned llvm::getUTF8SequenceSize (const UTF8 *source, const UTF8 *sourceEnd)
static unsigned llvm::findMaximalSubpartOfIllFormedUTF8Sequence (const UTF8 *source, const UTF8 *sourceEnd)
LLVM_ABI unsigned llvm::getNumBytesForUTF8 (UTF8 firstByte)
LLVM_ABI Boolean llvm::isLegalUTF8String (const UTF8 **source, const UTF8 *sourceEnd)
LLVM_ABI ConversionResult llvm::ConvertUTF8toUTF16 (const UTF8 **sourceStart, const UTF8 *sourceEnd, UTF16 **targetStart, UTF16 *targetEnd, ConversionFlags flags)
static ConversionResult llvm::ConvertUTF8toUTF32Impl (const UTF8 **sourceStart, const UTF8 *sourceEnd, UTF32 **targetStart, UTF32 *targetEnd, ConversionFlags flags, Boolean InputIsPartial)
LLVM_ABI ConversionResult llvm::ConvertUTF8toUTF32Partial (const UTF8 **sourceStart, const UTF8 *sourceEnd, UTF32 **targetStart, UTF32 *targetEnd, ConversionFlags flags)
 Convert a partial UTF8 sequence to UTF32.
LLVM_ABI ConversionResult llvm::ConvertUTF8toUTF32 (const UTF8 **sourceStart, const UTF8 *sourceEnd, UTF32 **targetStart, UTF32 *targetEnd, ConversionFlags flags)
 Convert a partial UTF8 sequence to UTF32.

Variables

static const int llvm::halfShift = 10
static const UTF32 llvm::halfBase = 0x0010000UL
static const UTF32 llvm::halfMask = 0x3FFUL
static const char llvm::trailingBytesForUTF8 [256]
static const UTF32 llvm::offsetsFromUTF8 [6]
static const UTF8 llvm::firstByteMark [7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }

Macro Definition Documentation

◆ ConvertUTF_DISABLE_WARNINGS

#define ConvertUTF_DISABLE_WARNINGS

Definition at line 90 of file ConvertUTF.cpp.

◆ ConvertUTF_RESTORE_WARNINGS

#define ConvertUTF_RESTORE_WARNINGS

Definition at line 93 of file ConvertUTF.cpp.

◆ UNI_SUR_HIGH_END

#define UNI_SUR_HIGH_END   (UTF32)0xDBFF

Definition at line 106 of file ConvertUTF.cpp.

Referenced by llvm::ConvertUTF16toUTF32(), and llvm::ConvertUTF16toUTF8().

◆ UNI_SUR_HIGH_START

◆ UNI_SUR_LOW_END

◆ UNI_SUR_LOW_START

#define UNI_SUR_LOW_START   (UTF32)0xDC00