18 auto [
II, Inserted] = StringOffset.insert({Str,
size()});
21 AggregateString.append(Str.begin(), Str.end());
23 AggregateString +=
'\0';
30 const Twine &Name)
const {
38#pragma GCC diagnostic push
39#pragma GCC diagnostic ignored "-Woverlength-strings"
41{} constexpr char {}{}Storage[] =)",
42 ClassPrefix.empty() ? "static" :
"",
43 UsePrefixForStorageMember ? ClassPrefix :
"", Name);
51 OS << (UseChars ?
"{\n" :
"\n");
58 assert(Strings.
front().empty() &&
"Expected empty initial string!");
60 "Expected empty string at the end due to terminators!");
78 OS << CharSep <<
"'\\0'";
80 OS << LineSep << (UseChars ?
"};" :
" ;");
84#pragma GCC diagnostic pop
90 Name, ClassPrefix.empty() ? "static constexpr" :
"const",
100 unsigned CharsPrinted = 0;
101 for (
unsigned i = 0, e = EscapedStr.
size(); i != e; ++i) {
102 if (CharsPrinted > 70) {
110 if (EscapedStr[i] !=
'\\')
113 assert(i + 1 < EscapedStr.size() &&
"Incomplete escape sequence!");
114 if (
isDigit(EscapedStr[i + 1])) {
116 "Expected 3 digit octal escape!");
117 O << EscapedStr[++i];
118 O << EscapedStr[++i];
119 O << EscapedStr[++i];
122 O << EscapedStr[++i];
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
uint64_t IntrinsicInst * II
A helper class to return the specified delimiter string after the first invocation of operator String...
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
unsigned GetOrAddStringOffset(StringRef Str)
void EmitStringTableDef(raw_ostream &OS, const Twine &Name) const
void EmitString(raw_ostream &O) const
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
This class implements an extremely fast bulk output stream that can only output to a stream.
raw_ostream & write_escaped(StringRef Str, bool UseHexEscapes=false)
Output Str, turning '\', '\t', ' ', '"', and anything that doesn't satisfy llvm::isPrint into an esca...
A raw_ostream that writes to an SmallVector or SmallString.
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
void PrintFatalError(const Twine &Msg)
cl::opt< bool > EmitLongStrLiterals
Controls emitting large character arrays as strings or character arrays.
auto formatv(bool Validate, const char *Fmt, Ts &&...Vals)
bool isDigit(char C)
Checks if character C is one of the 10 decimal digits.
iterator_range< SplittingIterator > split(StringRef Str, StringRef Separator)
Split the specified string over a separator and return a range-compatible iterable over its partition...