mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-04 16:54:01 +00:00
[TableGen] Change a couple methods to return an ArrayRef instead of a const std::vector reference. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241430 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
757b251a80
commit
fade2f72b8
@ -1222,11 +1222,11 @@ public:
|
||||
/// get the corresponding DefInit.
|
||||
DefInit *getDefInit();
|
||||
|
||||
const std::vector<Init *> &getTemplateArgs() const {
|
||||
ArrayRef<Init *> getTemplateArgs() const {
|
||||
return TemplateArgs;
|
||||
}
|
||||
const std::vector<RecordVal> &getValues() const { return Values; }
|
||||
const std::vector<Record*> &getSuperClasses() const { return SuperClasses; }
|
||||
ArrayRef<RecordVal> getValues() const { return Values; }
|
||||
ArrayRef<Record *> getSuperClasses() const { return SuperClasses; }
|
||||
ArrayRef<SMRange> getSuperClassRanges() const { return SuperClassRanges; }
|
||||
|
||||
bool isTemplateArg(Init *Name) const {
|
||||
|
@ -1648,7 +1648,7 @@ raw_ostream &llvm::operator<<(raw_ostream &OS, const Record &R) {
|
||||
}
|
||||
|
||||
OS << " {";
|
||||
const std::vector<Record*> &SC = R.getSuperClasses();
|
||||
ArrayRef<Record *> SC = R.getSuperClasses();
|
||||
if (!SC.empty()) {
|
||||
OS << "\t//";
|
||||
for (const Record *Super : SC)
|
||||
|
@ -302,7 +302,7 @@ const RecVec *SetTheory::expand(Record *Set) {
|
||||
return &I->second;
|
||||
|
||||
// This is the first time we see Set. Find a suitable expander.
|
||||
const std::vector<Record*> &SC = Set->getSuperClasses();
|
||||
ArrayRef<Record *> SC = Set->getSuperClasses();
|
||||
for (unsigned i = 0, e = SC.size(); i != e; ++i) {
|
||||
// Skip unnamed superclasses.
|
||||
if (!dyn_cast<StringInit>(SC[i]->getNameInit()))
|
||||
|
@ -184,7 +184,7 @@ bool TGParser::AddSubClass(Record *CurRec, SubClassReference &SubClass) {
|
||||
|
||||
// Since everything went well, we can now set the "superclass" list for the
|
||||
// current record.
|
||||
const std::vector<Record*> &SCs = SC->getSuperClasses();
|
||||
ArrayRef<Record *> SCs = SC->getSuperClasses();
|
||||
ArrayRef<SMRange> SCRanges = SC->getSuperClassRanges();
|
||||
for (unsigned i = 0, e = SCs.size(); i != e; ++i) {
|
||||
if (CurRec->isSubClassOf(SCs[i]))
|
||||
|
Loading…
Reference in New Issue
Block a user