summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/utils/TableGen/OptParserEmitter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/utils/TableGen/OptParserEmitter.cpp')
-rw-r--r--contrib/llvm/utils/TableGen/OptParserEmitter.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/contrib/llvm/utils/TableGen/OptParserEmitter.cpp b/contrib/llvm/utils/TableGen/OptParserEmitter.cpp
index 9262d7c..c1b5e65 100644
--- a/contrib/llvm/utils/TableGen/OptParserEmitter.cpp
+++ b/contrib/llvm/utils/TableGen/OptParserEmitter.cpp
@@ -149,10 +149,10 @@ void EmitOptParser(RecordKeeper &Records, raw_ostream &OS) {
PE = I->first.end(); PI != PE; ++PI) {
OS << "\"" << *PI << "\" COMMA ";
}
- OS << "0})\n";
+ OS << "nullptr})\n";
}
OS << "#undef COMMA\n";
- OS << "#endif\n\n";
+ OS << "#endif // PREFIX\n\n";
OS << "/////////\n";
OS << "// Groups\n\n";
@@ -164,7 +164,7 @@ void EmitOptParser(RecordKeeper &Records, raw_ostream &OS) {
OS << "OPTION(";
// The option prefix;
- OS << "0";
+ OS << "nullptr";
// The option string.
OS << ", \"" << R.getValueAsString("Name") << '"';
@@ -183,7 +183,7 @@ void EmitOptParser(RecordKeeper &Records, raw_ostream &OS) {
OS << "INVALID";
// The other option arguments (unused for groups).
- OS << ", INVALID, 0, 0, 0";
+ OS << ", INVALID, nullptr, 0, 0";
// The option help text.
if (!isa<UnsetInit>(R.getValueInit("HelpText"))) {
@@ -191,10 +191,10 @@ void EmitOptParser(RecordKeeper &Records, raw_ostream &OS) {
OS << " ";
write_cstring(OS, R.getValueAsString("HelpText"));
} else
- OS << ", 0";
+ OS << ", nullptr";
// The option meta-variable name (unused).
- OS << ", 0)\n";
+ OS << ", nullptr)\n";
}
OS << "\n";
@@ -242,7 +242,7 @@ void EmitOptParser(RecordKeeper &Records, raw_ostream &OS) {
OS << ", ";
std::vector<std::string> AliasArgs = R.getValueAsListOfStrings("AliasArgs");
if (AliasArgs.size() == 0) {
- OS << "0";
+ OS << "nullptr";
} else {
OS << "\"";
for (size_t i = 0, e = AliasArgs.size(); i != e; ++i)
@@ -274,17 +274,17 @@ void EmitOptParser(RecordKeeper &Records, raw_ostream &OS) {
OS << " ";
write_cstring(OS, R.getValueAsString("HelpText"));
} else
- OS << ", 0";
+ OS << ", nullptr";
// The option meta-variable name.
OS << ", ";
if (!isa<UnsetInit>(R.getValueInit("MetaVarName")))
write_cstring(OS, R.getValueAsString("MetaVarName"));
else
- OS << "0";
+ OS << "nullptr";
OS << ")\n";
}
- OS << "#endif\n";
+ OS << "#endif // OPTION\n";
}
} // end namespace llvm
OpenPOWER on IntegriCloud