diff options
Diffstat (limited to 'contrib/llvm/lib/Option/OptTable.cpp')
-rw-r--r-- | contrib/llvm/lib/Option/OptTable.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/contrib/llvm/lib/Option/OptTable.cpp b/contrib/llvm/lib/Option/OptTable.cpp index e83536f..09d4ceb 100644 --- a/contrib/llvm/lib/Option/OptTable.cpp +++ b/contrib/llvm/lib/Option/OptTable.cpp @@ -84,11 +84,9 @@ static inline bool operator<(const OptTable::Info &I, const char *Name) { OptSpecifier::OptSpecifier(const Option *Opt) : ID(Opt->getID()) {} -OptTable::OptTable(const Info *OptionInfos, unsigned NumOptionInfos, - bool IgnoreCase) - : OptionInfos(OptionInfos), NumOptionInfos(NumOptionInfos), - IgnoreCase(IgnoreCase), TheInputOptionID(0), TheUnknownOptionID(0), - FirstSearchableIndex(0) { +OptTable::OptTable(ArrayRef<Info> OptionInfos, bool IgnoreCase) + : OptionInfos(OptionInfos), IgnoreCase(IgnoreCase), TheInputOptionID(0), + TheUnknownOptionID(0), FirstSearchableIndex(0) { // Explicitly zero initialize the error to work around a bug in array // value-initialization on MinGW with gcc 4.3.5. @@ -199,8 +197,8 @@ Arg *OptTable::ParseOneArg(const ArgList &Args, unsigned &Index, if (isInput(PrefixesUnion, Str)) return new Arg(getOption(TheInputOptionID), Str, Index++, Str); - const Info *Start = OptionInfos + FirstSearchableIndex; - const Info *End = OptionInfos + getNumOptions(); + const Info *Start = OptionInfos.begin() + FirstSearchableIndex; + const Info *End = OptionInfos.end(); StringRef Name = StringRef(Str).ltrim(PrefixChars); // Search for the first next option which could be a prefix. |