[cfe-commits] r68146 - in /cfe/trunk: include/clang/Driver/Options.h lib/Driver/OptTable.cpp
Daniel Dunbar
daniel at zuster.org
Tue Mar 31 14:26:13 PDT 2009
Author: ddunbar
Date: Tue Mar 31 16:26:12 2009
New Revision: 68146
URL: http://llvm.org/viewvc/llvm-project?rev=68146&view=rev
Log:
Driver: Add OptTable::getOptionKind.
Also, removed default value for getOptionMetaVar.
Modified:
cfe/trunk/include/clang/Driver/Options.h
cfe/trunk/lib/Driver/OptTable.cpp
Modified: cfe/trunk/include/clang/Driver/Options.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.h?rev=68146&r1=68145&r2=68146&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.h (original)
+++ cfe/trunk/include/clang/Driver/Options.h Tue Mar 31 16:26:12 2009
@@ -61,6 +61,9 @@
/// creating it if necessary.
const Option *getOption(options::ID id) const;
+ /// getOptionKind - Get the kind of the given option.
+ unsigned getOptionKind(options::ID id) const;
+
/// getOptionHelpText - Get the help text to use to describe this
/// option.
const char *getOptionHelpText(options::ID id) const;
Modified: cfe/trunk/lib/Driver/OptTable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/OptTable.cpp?rev=68146&r1=68145&r2=68146&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/OptTable.cpp (original)
+++ cfe/trunk/lib/Driver/OptTable.cpp Tue Mar 31 16:26:12 2009
@@ -137,14 +137,16 @@
return getInfo(id).Name;
}
+unsigned OptTable::getOptionKind(options::ID id) const {
+ return getInfo(id).Kind;
+}
+
const char *OptTable::getOptionHelpText(options::ID id) const {
return getInfo(id).HelpText;
}
const char *OptTable::getOptionMetaVar(options::ID id) const {
- const char *Name = getInfo(id).MetaVar;
- // FIXME: This will need translation.
- return Name ? Name : "<var>";
+ return getInfo(id).MetaVar;
}
const Option *OptTable::getOption(options::ID id) const {
More information about the cfe-commits
mailing list