diff options
author | Craig Topper <craig.topper@gmail.com> | 2016-01-18 19:52:37 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2016-01-18 19:52:37 +0000 |
commit | 0e41d0b963cdd804d12b151216833e1ed65773a1 (patch) | |
tree | d5b6775d95b2829dba44b5863f6f52508aacec31 /llvm/lib/TableGen/SetTheory.cpp | |
parent | d4d3ebd937553546a4259399d73730d881081f93 (diff) | |
download | bcm5719-llvm-0e41d0b963cdd804d12b151216833e1ed65773a1.tar.gz bcm5719-llvm-0e41d0b963cdd804d12b151216833e1ed65773a1.zip |
[TableGen] Merge the SuperClass Record and SMRange vector into a single vector. This removes the state needed to manage the extra vector thus reducing the size of the Record class. NFC
llvm-svn: 258065
Diffstat (limited to 'llvm/lib/TableGen/SetTheory.cpp')
-rw-r--r-- | llvm/lib/TableGen/SetTheory.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/TableGen/SetTheory.cpp b/llvm/lib/TableGen/SetTheory.cpp index f56b17acbfb..a4d33051b4f 100644 --- a/llvm/lib/TableGen/SetTheory.cpp +++ b/llvm/lib/TableGen/SetTheory.cpp @@ -302,12 +302,12 @@ const RecVec *SetTheory::expand(Record *Set) { return &I->second; // This is the first time we see Set. Find a suitable expander. - ArrayRef<Record *> SC = Set->getSuperClasses(); - for (unsigned i = 0, e = SC.size(); i != e; ++i) { + ArrayRef<std::pair<Record *, SMRange>> SC = Set->getSuperClasses(); + for (const auto &SCPair : SC) { // Skip unnamed superclasses. - if (!dyn_cast<StringInit>(SC[i]->getNameInit())) + if (!isa<StringInit>(SCPair.first->getNameInit())) continue; - auto I = Expanders.find(SC[i]->getName()); + auto I = Expanders.find(SCPair.first->getName()); if (I != Expanders.end()) { // This breaks recursive definitions. RecVec &EltVec = Expansions[Set]; |