9#ifndef LLVM_ADT_STRING_TABLE_H
10#define LLVM_ADT_STRING_TABLE_H
63 static_assert(N <= std::numeric_limits<unsigned>::max(),
64 "We only support table sizes that can be indexed by an "
65 "`unsigned` offset.");
69 assert(!Table.
empty() &&
"Requires at least a valid empty string.");
70 assert(Table.
data()[0] ==
'\0' &&
"Offset zero must be the empty string.");
74 "Last byte must be a null byte.");
81 assert(O.value() < Table.
size() &&
"Out of bounds offset!");
82 return Table.
data() + O.value();
86 constexpr size_t size()
const {
return Table.
size(); }
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
StringRef - Represent a constant reference to a string, i.e.
constexpr bool empty() const
empty - Check if the string is empty.
constexpr size_t size() const
size - Get the string size.
constexpr const char * data() const
data - Get a pointer to the start of the string (which may not be null terminated).
constexpr Offset(unsigned Value)
constexpr unsigned value() const
constexpr Offset()=default
A table of densely packed, null-terminated strings indexed by offset.
constexpr size_t size() const
Returns the byte size of the table.
constexpr StringRef operator[](Offset O) const
constexpr StringTable(const char(&RawTable)[N])
LLVM Value Representation.
This is an optimization pass for GlobalISel generic memory operations.