summaryrefslogtreecommitdiff
path: root/utils/TableGen/OptParserEmitter.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-06-26 20:32:52 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-06-26 20:32:52 +0000
commit08bbd35a80bf7765fe0d3043f9eb5a2f2786b649 (patch)
tree80108f0f128657f8623f8f66ad9735b4d88e7b47 /utils/TableGen/OptParserEmitter.cpp
parent7c7aba6e5fef47a01a136be655b0a92cfd7090f6 (diff)
Diffstat (limited to 'utils/TableGen/OptParserEmitter.cpp')
-rw-r--r--utils/TableGen/OptParserEmitter.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/utils/TableGen/OptParserEmitter.cpp b/utils/TableGen/OptParserEmitter.cpp
index 04e6537f3d15..e3777d036a23 100644
--- a/utils/TableGen/OptParserEmitter.cpp
+++ b/utils/TableGen/OptParserEmitter.cpp
@@ -196,6 +196,9 @@ void EmitOptParser(RecordKeeper &Records, raw_ostream &OS) {
OS << ", nullptr";
// The option meta-variable name (unused).
+ OS << ", nullptr";
+
+ // The option Values (unused for groups).
OS << ", nullptr)\n";
}
OS << "\n";
@@ -285,6 +288,13 @@ void EmitOptParser(RecordKeeper &Records, raw_ostream &OS) {
else
OS << "nullptr";
+ // The option Values. Used for shell autocompletion.
+ OS << ", ";
+ if (!isa<UnsetInit>(R.getValueInit("Values")))
+ write_cstring(OS, R.getValueAsString("Values"));
+ else
+ OS << "nullptr";
+
OS << ")\n";
}
OS << "#endif // OPTION\n";