From 0e41d0b963cdd804d12b151216833e1ed65773a1 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 18 Jan 2016 19:52:37 +0000 Subject: [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 --- llvm/lib/TableGen/SetTheory.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'llvm/lib/TableGen/SetTheory.cpp') 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 SC = Set->getSuperClasses(); - for (unsigned i = 0, e = SC.size(); i != e; ++i) { + ArrayRef> SC = Set->getSuperClasses(); + for (const auto &SCPair : SC) { // Skip unnamed superclasses. - if (!dyn_cast(SC[i]->getNameInit())) + if (!isa(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]; -- cgit v1.2.3