10 #ifndef LLVM_OBJECTYAML_YAML_H 11 #define LLVM_OBJECTYAML_YAML_H 72 bool DataIsHexString =
true;
78 : Data(reinterpret_cast<
const uint8_t *>(Data.data()), Data.
size()) {}
84 return Data.
size() / 2;
104 return LHS.DataIsHexString == RHS.DataIsHexString && LHS.Data == RHS.Data;
117 #endif // LLVM_OBJECTYAML_YAML_H BinaryRef(ArrayRef< uint8_t > Data)
This class represents lattice values for constants.
friend bool operator==(const BinaryRef &LHS, const BinaryRef &RHS)
size_t size() const
size - Get the array size.
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...
static QuotingType mustQuote(StringRef S)
ArrayRef< uint8_t >::size_type binary_size() const
The number of bytes that are represented by this BinaryRef.
auto size(R &&Range, typename std::enable_if< std::is_same< typename std::iterator_traits< decltype(Range.begin())>::iterator_category, std::random_access_iterator_tag >::value, void >::type *=nullptr) -> decltype(std::distance(Range.begin(), Range.end()))
Get the size of a range.
Specialized YAMLIO scalar type for representing a binary blob.
This class implements an extremely fast bulk output stream that can only output to a stream...
StringRef - Represent a constant reference to a string, i.e.
BinaryRef(StringRef Data)
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...
bool empty() const
empty - Check if the array is empty.