summaryrefslogtreecommitdiff
path: root/lib/TableGen/SetTheory.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-07-23 20:41:05 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-07-23 20:41:05 +0000
commit01095a5d43bbfde13731688ddcf6048ebb8b7721 (patch)
tree4def12e759965de927d963ac65840d663ef9d1ea /lib/TableGen/SetTheory.cpp
parentf0f4822ed4b66e3579e92a89f368f8fb860e218e (diff)
Notes
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 f56b17acbfba..a4d33051b4f7 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];