llvm::APInt::toString

Convert this APInt to a string and append it to Str.

Synopsis

Declared in <llvm/ADT/APInt.h>

void
toString(
    SmallVectorImpl<char>& Str,
    unsigned int Radix,
    bool Signed,
    bool formatAsCLiteral = false,
    bool UpperCase = true,
    bool InsertSeparators = false) const;

Description

Str is commonly a SmallString. If Radix > 10, UpperCase determines the case of letter digits.

Parameters

NameDescription
StrDestination string buffer
RadixNumeric base (2, 8, 10, 16, or 36)
SignedIf true, treat the value as signed
formatAsCLiteralIf true, emit a C-style literal prefix/suffix
UpperCaseIf true, use uppercase letters for digits above 9
InsertSeparatorsIf true, insert digit-group separators