15 #ifndef LLVM_OBJECT_YAML_H
16 #define LLVM_OBJECT_YAML_H
75 : Data(reinterpret_cast<const uint8_t *>(Data.data()), Data.size()),
76 DataIsHexString(
true) {}
82 return Data.
size() / 2;
100 return LHS.DataIsHexString == RHS.DataIsHexString && LHS.Data == RHS.Data;
bool operator==(const BinaryRef &LHS, const BinaryRef &RHS)
Specialized YAMLIO scalar type for representing a binary blob.
ArrayRef< uint8_t >::size_type binary_size() const
The number of bytes that are represented by this BinaryRef. This is the number of bytes that writeAsB...
void writeAsBinary(raw_ostream &OS) const
Write the contents (regardless of whether it is binary or a hex string) as binary to the given raw_os...
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...
BinaryRef(StringRef Data)
bool empty() const
empty - Check if the array is empty.
BinaryRef(ArrayRef< uint8_t > Data)
friend bool operator==(const BinaryRef &LHS, const BinaryRef &RHS)