projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
1500c4f
)
OptParser: Emit HelpText field for option groups.
author
Daniel Dunbar
<daniel@zuster.org>
Fri, 4 Dec 2009 21:41:24 +0000
(21:41 +0000)
committer
Daniel Dunbar
<daniel@zuster.org>
Fri, 4 Dec 2009 21:41:24 +0000
(21:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90599
91177308
-0d34-0410-b5e6-
96231b3b80d8
utils/TableGen/OptParserEmitter.cpp
patch
|
blob
|
history
diff --git
a/utils/TableGen/OptParserEmitter.cpp
b/utils/TableGen/OptParserEmitter.cpp
index ce1aef5e4daddb9703aa7f498a8bfbb1e5b16c05..3cd5784c54ee1c681c0e1d2eb1ce6325aef0caee 100644
(file)
--- a/
utils/TableGen/OptParserEmitter.cpp
+++ b/
utils/TableGen/OptParserEmitter.cpp
@@
-127,7
+127,18
@@
void OptParserEmitter::run(raw_ostream &OS) {
OS << "INVALID";
// The other option arguments (unused for groups).
- OS << ", INVALID, 0, 0, 0, 0)\n";
+ OS << ", INVALID, 0, 0";
+
+ // The option help text.
+ if (!dynamic_cast<UnsetInit*>(R.getValueInit("HelpText"))) {
+ OS << ",\n";
+ OS << " ";
+ write_cstring(OS, R.getValueAsString("HelpText"));
+ } else
+ OS << ", 0";
+
+ // The option meta-variable name (unused).
+ OS << ", 0)\n";
}
OS << "\n";