diff options
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
-rw-r--r-- | llvm/lib/Support/CommandLine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp index f1dd39c..a407be9 100644 --- a/llvm/lib/Support/CommandLine.cpp +++ b/llvm/lib/Support/CommandLine.cpp @@ -726,7 +726,7 @@ static Option *getOptionPred(StringRef Name, size_t &Length, // characters in it (so that the next iteration will not be the empty // string. while (OMI == OptionsMap.end() && Name.size() > 1) { - Name = Name.substr(0, Name.size() - 1); // Chop off the last character. + Name = Name.drop_back(); OMI = OptionsMap.find(Name); if (OMI != OptionsMap.end() && !Pred(OMI->getValue())) OMI = OptionsMap.end(); |