llvm.org GIT mirror llvm / 65d5d2d
[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 Chris Bieneman 4 years ago
1 changed file(s) with 9 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
957957 // prefix as a filler for the error message.
958958 if (!DagNotMatches.empty()) {
959959 CheckStrings.push_back(CheckString(Pattern(Check::CheckEOF),
960 CheckPrefixes[0],
960 *CheckPrefixes.begin(),
961961 SMLoc::getFromPointer(Buffer.data()),
962962 Check::CheckEOF));
963963 std::swap(DagNotMatches, CheckStrings.back().DagNotStrings);
966966 if (CheckStrings.empty()) {
967967 errs() << "error: no check strings found with prefix"
968968 << (CheckPrefixes.size() > 1 ? "es " : " ");
969 for (size_t I = 0, N = CheckPrefixes.size(); I != N; ++I) {
970 StringRef Prefix(CheckPrefixes[I]);
971 errs() << '\'' << Prefix << ":'";
972 if (I != N - 1)
973 errs() << ", ";
974 }
969 prefix_iterator I = CheckPrefixes.begin();
970 prefix_iterator E = CheckPrefixes.end();
971 if (I != E) {
972 errs() << "\'" << *I << ":'";
973 ++I;
974 }
975 for (; I != E; ++I)
976 errs() << ", \'" << *I << ":'";
975977
976978 errs() << '\n';
977979 return true;