• Home
  • Raw
  • Download

Lines Matching refs:OS

92 static raw_ostream &write_cstring(raw_ostream &OS, llvm::StringRef Str) {  in write_cstring()  argument
93 OS << '"'; in write_cstring()
94 OS.write_escaped(Str); in write_cstring()
95 OS << '"'; in write_cstring()
96 return OS; in write_cstring()
103 void EmitOptParser(RecordKeeper &Records, raw_ostream &OS) { in EmitOptParser() argument
109 emitSourceFileHeader("Option Parsing Definitions", OS); in EmitOptParser()
130 OS << "/////////\n"; in EmitOptParser()
131 OS << "// Prefixes\n\n"; in EmitOptParser()
132 OS << "#ifdef PREFIX\n"; in EmitOptParser()
133 OS << "#define COMMA ,\n"; in EmitOptParser()
136 OS << "PREFIX("; in EmitOptParser()
139 OS << I->second; in EmitOptParser()
142 OS << ", {"; in EmitOptParser()
145 OS << "\"" << *PI << "\" COMMA "; in EmitOptParser()
147 OS << "0})\n"; in EmitOptParser()
149 OS << "#undef COMMA\n"; in EmitOptParser()
150 OS << "#endif\n\n"; in EmitOptParser()
152 OS << "/////////\n"; in EmitOptParser()
153 OS << "// Groups\n\n"; in EmitOptParser()
154 OS << "#ifdef OPTION\n"; in EmitOptParser()
159 OS << "OPTION("; in EmitOptParser()
162 OS << "0"; in EmitOptParser()
165 OS << ", \"" << R.getValueAsString("Name") << '"'; in EmitOptParser()
168 OS << ", "<< getOptionName(R); in EmitOptParser()
171 OS << ", Group"; in EmitOptParser()
174 OS << ", "; in EmitOptParser()
176 OS << getOptionName(*DI->getDef()); in EmitOptParser()
178 OS << "INVALID"; in EmitOptParser()
181 OS << ", INVALID, 0, 0, 0"; in EmitOptParser()
185 OS << ",\n"; in EmitOptParser()
186 OS << " "; in EmitOptParser()
187 write_cstring(OS, R.getValueAsString("HelpText")); in EmitOptParser()
189 OS << ", 0"; in EmitOptParser()
192 OS << ", 0)\n"; in EmitOptParser()
194 OS << "\n"; in EmitOptParser()
196 OS << "//////////\n"; in EmitOptParser()
197 OS << "// Options\n\n"; in EmitOptParser()
202 OS << "OPTION("; in EmitOptParser()
206 OS << Prefixes[PrefixKeyT(prf.begin(), prf.end())] << ", "; in EmitOptParser()
209 write_cstring(OS, R.getValueAsString("Name")); in EmitOptParser()
212 OS << ", "<< getOptionName(R); in EmitOptParser()
215 OS << ", " << R.getValueAsDef("Kind")->getValueAsString("Name"); in EmitOptParser()
218 OS << ", "; in EmitOptParser()
220 OS << getOptionName(*DI->getDef()); in EmitOptParser()
222 OS << "INVALID"; in EmitOptParser()
225 OS << ", "; in EmitOptParser()
227 OS << getOptionName(*DI->getDef()); in EmitOptParser()
229 OS << "INVALID"; in EmitOptParser()
235 OS << ", "; in EmitOptParser()
238 OS << "0"; in EmitOptParser()
240 OS << "\""; in EmitOptParser()
242 OS << AliasArgs[i] << "\\0"; in EmitOptParser()
243 OS << "\""; in EmitOptParser()
249 OS << ", 0"; in EmitOptParser()
251 OS << ", "; in EmitOptParser()
254 OS << " | "; in EmitOptParser()
255 OS << cast<DefInit>(LI->getElement(i))->getDef()->getName(); in EmitOptParser()
260 OS << ", " << R.getValueAsInt("NumArgs"); in EmitOptParser()
264 OS << ",\n"; in EmitOptParser()
265 OS << " "; in EmitOptParser()
266 write_cstring(OS, R.getValueAsString("HelpText")); in EmitOptParser()
268 OS << ", 0"; in EmitOptParser()
271 OS << ", "; in EmitOptParser()
273 write_cstring(OS, R.getValueAsString("MetaVarName")); in EmitOptParser()
275 OS << "0"; in EmitOptParser()
277 OS << ")\n"; in EmitOptParser()
279 OS << "#endif\n"; in EmitOptParser()