+ if (!val.Help.empty())
+ O << ", cl::desc(\"" << val.Help << "\")";
+
+ O << ");\n";
+ }
+
+ // Emit the aliases (they should go after all the 'proper' options).
+ for (std::vector<GlobalOptionDescription>::const_iterator
+ B = Aliases.begin(), E = Aliases.end(); B != E; ++B) {
+ const GlobalOptionDescription& val = *B;
+
+ O << val.GenTypeDeclaration() << ' '
+ << val.GenVariableName()
+ << "(\"" << val.Name << '\"';
+
+ GlobalOptionDescriptions::container_type
+ ::const_iterator F = descs.Descriptions.find(val.Help);
+ if (F != descs.Descriptions.end())
+ O << ", cl::aliasopt(" << F->second.GenVariableName() << ")";
+ else
+ throw val.Name + ": alias to an unknown option!";
+
+ O << ", cl::desc(\"" << "An alias for -" + val.Help << "\"));\n";