diff options
author | Chris Bieneman <beanz@apple.com> | 2015-04-29 21:45:24 +0000 |
---|---|---|
committer | Chris Bieneman <beanz@apple.com> | 2015-04-29 21:45:24 +0000 |
commit | 3e3ef2f28c80c6f548410822a05abb138cd64c0b (patch) | |
tree | b3ec8b6e1dd18c5b613049c96f6952aefa3e3283 /llvm/utils | |
parent | 664294cf37117ed727388ed3f04baa2fa7aecf5b (diff) | |
download | bcm5719-llvm-3e3ef2f28c80c6f548410822a05abb138cd64c0b.tar.gz bcm5719-llvm-3e3ef2f28c80c6f548410822a05abb138cd64c0b.zip |
[NFC] Updating FileCheck to reduce the std::vector interface used via cl::list.
llvm-svn: 236164
Diffstat (limited to 'llvm/utils')
-rw-r--r-- | llvm/utils/FileCheck/FileCheck.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/llvm/utils/FileCheck/FileCheck.cpp b/llvm/utils/FileCheck/FileCheck.cpp index f7c0524a221..8fe2f88a3e7 100644 --- a/llvm/utils/FileCheck/FileCheck.cpp +++ b/llvm/utils/FileCheck/FileCheck.cpp @@ -958,7 +958,7 @@ static bool ReadCheckFile(SourceMgr &SM, // prefix as a filler for the error message. if (!DagNotMatches.empty()) { CheckStrings.push_back(CheckString(Pattern(Check::CheckEOF), - CheckPrefixes[0], + *CheckPrefixes.begin(), SMLoc::getFromPointer(Buffer.data()), Check::CheckEOF)); std::swap(DagNotMatches, CheckStrings.back().DagNotStrings); @@ -967,12 +967,14 @@ static bool ReadCheckFile(SourceMgr &SM, if (CheckStrings.empty()) { errs() << "error: no check strings found with prefix" << (CheckPrefixes.size() > 1 ? "es " : " "); - for (size_t I = 0, N = CheckPrefixes.size(); I != N; ++I) { - StringRef Prefix(CheckPrefixes[I]); - errs() << '\'' << Prefix << ":'"; - if (I != N - 1) - errs() << ", "; + prefix_iterator I = CheckPrefixes.begin(); + prefix_iterator E = CheckPrefixes.end(); + if (I != E) { + errs() << "\'" << *I << ":'"; + ++I; } + for (; I != E; ++I) + errs() << ", \'" << *I << ":'"; errs() << '\n'; return true; |