aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/Driver/Options.h3
-rw-r--r--lib/Driver/OptTable.cpp8
2 files changed, 8 insertions, 3 deletions
diff --git a/include/clang/Driver/Options.h b/include/clang/Driver/Options.h
index 83d98dde2c..8b959d369c 100644
--- a/include/clang/Driver/Options.h
+++ b/include/clang/Driver/Options.h
@@ -61,6 +61,9 @@ namespace options {
/// 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;
diff --git a/lib/Driver/OptTable.cpp b/lib/Driver/OptTable.cpp
index 4c198fc24f..15b121c45b 100644
--- a/lib/Driver/OptTable.cpp
+++ b/lib/Driver/OptTable.cpp
@@ -137,14 +137,16 @@ const char *OptTable::getOptionName(options::ID id) const {
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 {