mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-30 02:25:19 +00:00
[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:
@@ -958,7 +958,7 @@ static bool ReadCheckFile(SourceMgr &SM,
|
|||||||
// prefix as a filler for the error message.
|
// prefix as a filler for the error message.
|
||||||
if (!DagNotMatches.empty()) {
|
if (!DagNotMatches.empty()) {
|
||||||
CheckStrings.push_back(CheckString(Pattern(Check::CheckEOF),
|
CheckStrings.push_back(CheckString(Pattern(Check::CheckEOF),
|
||||||
CheckPrefixes[0],
|
*CheckPrefixes.begin(),
|
||||||
SMLoc::getFromPointer(Buffer.data()),
|
SMLoc::getFromPointer(Buffer.data()),
|
||||||
Check::CheckEOF));
|
Check::CheckEOF));
|
||||||
std::swap(DagNotMatches, CheckStrings.back().DagNotStrings);
|
std::swap(DagNotMatches, CheckStrings.back().DagNotStrings);
|
||||||
@@ -967,12 +967,14 @@ static bool ReadCheckFile(SourceMgr &SM,
|
|||||||
if (CheckStrings.empty()) {
|
if (CheckStrings.empty()) {
|
||||||
errs() << "error: no check strings found with prefix"
|
errs() << "error: no check strings found with prefix"
|
||||||
<< (CheckPrefixes.size() > 1 ? "es " : " ");
|
<< (CheckPrefixes.size() > 1 ? "es " : " ");
|
||||||
for (size_t I = 0, N = CheckPrefixes.size(); I != N; ++I) {
|
prefix_iterator I = CheckPrefixes.begin();
|
||||||
StringRef Prefix(CheckPrefixes[I]);
|
prefix_iterator E = CheckPrefixes.end();
|
||||||
errs() << '\'' << Prefix << ":'";
|
if (I != E) {
|
||||||
if (I != N - 1)
|
errs() << "\'" << *I << ":'";
|
||||||
errs() << ", ";
|
++I;
|
||||||
}
|
}
|
||||||
|
for (; I != E; ++I)
|
||||||
|
errs() << ", \'" << *I << ":'";
|
||||||
|
|
||||||
errs() << '\n';
|
errs() << '\n';
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user