aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Support/CommandLine.h12
-rw-r--r--lib/Support/CommandLine.cpp3
2 files changed, 7 insertions, 8 deletions
diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h
index cccc696..4fcca1d 100644
--- a/include/llvm/Support/CommandLine.h
+++ b/include/llvm/Support/CommandLine.h
@@ -230,7 +230,7 @@ public:
//
virtual void printOptionInfo(size_t GlobalWidth) const = 0;
- virtual void getExtraOptionNames(std::vector<const char*> &) {}
+ virtual void getExtraOptionNames(SmallVectorImpl<const char*> &) {}
// addOccurrence - Wrapper around handleOccurrence that enforces Flags.
//
@@ -397,7 +397,7 @@ struct generic_parser_base {
hasArgStr = O.hasArgStr();
}
- void getExtraOptionNames(std::vector<const char*> &OptionNames) {
+ void getExtraOptionNames(SmallVectorImpl<const char*> &OptionNames) {
// If there has been no argstr specified, that means that we need to add an
// argument for every possible option. This ensures that our options are
// vectored to us.
@@ -502,7 +502,7 @@ struct basic_parser_impl { // non-template implementation of basic_parser<t>
return ValueRequired;
}
- void getExtraOptionNames(std::vector<const char*> &) {}
+ void getExtraOptionNames(SmallVectorImpl<const char*> &) {}
void initialize(Option &) {}
@@ -841,7 +841,7 @@ class opt : public Option,
virtual enum ValueExpected getValueExpectedFlagDefault() const {
return Parser.getValueExpectedFlagDefault();
}
- virtual void getExtraOptionNames(std::vector<const char*> &OptionNames) {
+ virtual void getExtraOptionNames(SmallVectorImpl<const char*> &OptionNames) {
return Parser.getExtraOptionNames(OptionNames);
}
@@ -996,7 +996,7 @@ class list : public Option, public list_storage<DataType, Storage> {
virtual enum ValueExpected getValueExpectedFlagDefault() const {
return Parser.getValueExpectedFlagDefault();
}
- virtual void getExtraOptionNames(std::vector<const char*> &OptionNames) {
+ virtual void getExtraOptionNames(SmallVectorImpl<const char*> &OptionNames) {
return Parser.getExtraOptionNames(OptionNames);
}
@@ -1195,7 +1195,7 @@ class bits : public Option, public bits_storage<DataType, Storage> {
virtual enum ValueExpected getValueExpectedFlagDefault() const {
return Parser.getValueExpectedFlagDefault();
}
- virtual void getExtraOptionNames(std::vector<const char*> &OptionNames) {
+ virtual void getExtraOptionNames(SmallVectorImpl<const char*> &OptionNames) {
return Parser.getExtraOptionNames(OptionNames);
}
diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp
index 08c80c1..61b6cfe 100644
--- a/lib/Support/CommandLine.cpp
+++ b/lib/Support/CommandLine.cpp
@@ -108,8 +108,7 @@ void Option::addArgument() {
static void GetOptionInfo(SmallVectorImpl<Option*> &PositionalOpts,
SmallVectorImpl<Option*> &SinkOpts,
StringMap<Option*> &OptionsMap) {
- // FIXME: SmallVectorize.
- std::vector<const char*> OptionNames;
+ SmallVector<const char*, 16> OptionNames;
Option *CAOpt = 0; // The ConsumeAfter option if it exists.
for (Option *O = RegisteredOptionList; O; O = O->getNextRegisteredOption()) {
// If this option wants to handle multiple option names, get the full set.