[NFC] Updating FileCheck to reduce the std::vector interface used via cl::list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236164 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Bieneman 2015-04-29 21:45:24 +00:00
parent 054c79645c
commit 65d5d2d117

View File

@ -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;