summaryrefslogtreecommitdiff
path: root/lib/TableGen/SetTheory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/TableGen/SetTheory.cpp')
-rw-r--r--lib/TableGen/SetTheory.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/TableGen/SetTheory.cpp b/lib/TableGen/SetTheory.cpp
index f56b17acbfbae..a4d33051b4f70 100644
--- a/lib/TableGen/SetTheory.cpp
+++ b/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];