13#ifndef LLVM_TABLEGEN_CODEGENHELPERS_H
14#define LLVM_TABLEGEN_CODEGENHELPERS_H
30 : Name(Name.str()), OS(OS), LateUndef(LateUndef) {
31 OS <<
"#ifdef " << Name <<
"\n";
33 OS <<
"#undef " << Name <<
"\n";
39 OS <<
"#undef " << Name <<
"\n";
40 OS <<
"#endif // " << Name <<
"\n\n";
53 : Condition(Condition.str()), OS(OS) {
54 OS << If <<
" " << Condition <<
"\n\n";
60 std::string Condition;
95 : Name(Name.str()), OS(OS) {
96 OS <<
"#ifndef " << Name <<
"\n"
97 <<
"#define " << Name <<
"\n\n";
112 : Name(trim(NameUntrimmed.str()).str()), OS(OS) {
114 OS <<
"namespace " << Name <<
" {\n\n";
119 OS <<
"\n} // namespace " << Name <<
"\n";
131 Name.consume_front(
"::");
AnonNamespaceEmitter(raw_ostream &OS)
IfDefEmitter(raw_ostream &OS, StringRef Name, bool LateUndef=false)
IfDefGuardEmitter(raw_ostream &OS, StringRef Condition)
IfGuardEmitterBase(raw_ostream &OS, StringRef If, StringRef Condition)
IfGuardEmitter(raw_ostream &OS, StringRef Condition)
IfNDefGuardEmitter(raw_ostream &OS, StringRef Condition)
IncludeGuardEmitter(raw_ostream &OS, StringRef Name)
NamespaceEmitter(raw_ostream &OS, const Twine &NameUntrimmed)
StringRef - Represent a constant reference to a string, i.e.
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.
This is an optimization pass for GlobalISel generic memory operations.