r241431 - [TableGen] Change a couple methods to return an ArrayRef instead of a const std::vector reference. NFC
Craig Topper
craig.topper at gmail.com
Sun Jul 5 23:23:06 PDT 2015
Author: ctopper
Date: Mon Jul 6 01:23:06 2015
New Revision: 241431
URL: http://llvm.org/viewvc/llvm-project?rev=241431&view=rev
Log:
[TableGen] Change a couple methods to return an ArrayRef instead of a const std::vector reference. NFC
Modified:
cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp
Modified: cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp?rev=241431&r1=241430&r2=241431&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp (original)
+++ cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp Mon Jul 6 01:23:06 2015
@@ -1066,7 +1066,7 @@ createArgument(const Record &Arg, String
if (!Ptr) {
// Search in reverse order so that the most-derived type is handled first.
- std::vector<Record*> Bases = Search->getSuperClasses();
+ ArrayRef<Record*> Bases = Search->getSuperClasses();
for (const auto *Base : llvm::make_range(Bases.rbegin(), Bases.rend())) {
if ((Ptr = createArgument(Arg, Attr, Base)))
break;
@@ -1456,7 +1456,7 @@ void EmitClangAttrClass(RecordKeeper &Re
if (!R.getValueAsBit("ASTNode"))
continue;
- const std::vector<Record *> Supers = R.getSuperClasses();
+ ArrayRef<Record *> Supers = R.getSuperClasses();
assert(!Supers.empty() && "Forgot to specify a superclass for the attr");
std::string SuperName;
for (const auto *Super : llvm::make_range(Supers.rbegin(), Supers.rend())) {
More information about the cfe-commits
mailing list