Go to the documentation of this file.
29 if (
Scalar.size() % 2 != 0)
30 return "BinaryRef hex string must contain an even number of nybbles.";
33 for (
unsigned I = 0,
N =
Scalar.size();
I !=
N; ++
I)
34 if (!llvm::isHexDigit(Scalar[
I]))
35 return "BinaryRef hex string must contain only hex digits.";
41 if (!DataIsHexString) {
42 OS.
write((
const char *)Data.
data(), std::min<uint64_t>(
N, Data.
size()));
46 for (uint64_t
I = 0,
E = std::min<uint64_t>(
N, Data.
size() / 2);
I !=
E;
48 uint8_t Byte = llvm::hexDigitValue(Data[
I * 2]);
50 Byte |= llvm::hexDigitValue(Data[
I * 2 + 1]);
56 if (binary_size() == 0)
58 if (DataIsHexString) {
62 for (uint8_t Byte :
Data)
63 OS << hexdigit(Byte >> 4) << hexdigit(Byte & 0xf);
This class represents lattice values for constants.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
raw_ostream & write(unsigned char C)
This class implements an extremely fast bulk output stream that can only output to a stream.
The initial backend is deliberately restricted to z10 We should add support for later architectures at some point If an asm ties an i32 r result to an i64 input
void writeAsBinary(raw_ostream &OS, uint64_t N=UINT64_MAX) const
Write the contents (regardless of whether it is binary or a hex string) as binary to the given raw_os...
StringRef - Represent a constant reference to a string, i.e.
Specialized YAMLIO scalar type for representing a binary blob.
size_t size() const
size - Get the array size.
void writeAsHex(raw_ostream &OS) const
Write the contents (regardless of whether it is binary or a hex string) as hex to the given raw_ostre...