summaryrefslogtreecommitdiffstats
path: root/llvm/lib/TableGen/Record.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/TableGen/Record.cpp')
-rw-r--r--llvm/lib/TableGen/Record.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/llvm/lib/TableGen/Record.cpp b/llvm/lib/TableGen/Record.cpp
index 80c0973644b..c94bd59c8ad 100644
--- a/llvm/lib/TableGen/Record.cpp
+++ b/llvm/lib/TableGen/Record.cpp
@@ -141,10 +141,6 @@ bool RecordRecTy::typeIsConvertibleTo(const RecTy *RHS) const {
if (RTy->getRecord() == Rec || Rec->isSubClassOf(RTy->getRecord()))
return true;
- for (const auto &SCPair : RTy->getRecord()->getSuperClasses())
- if (Rec->isSubClassOf(SCPair.first))
- return true;
-
return false;
}
@@ -173,6 +169,16 @@ RecTy *llvm::resolveTypes(RecTy *T1, RecTy *T2) {
return NewType2;
}
}
+
+ if (ListRecTy *ListTy1 = dyn_cast<ListRecTy>(T1)) {
+ if (ListRecTy *ListTy2 = dyn_cast<ListRecTy>(T2)) {
+ RecTy* NewType = resolveTypes(ListTy1->getElementType(),
+ ListTy2->getElementType());
+ if (NewType)
+ return NewType->getListTy();
+ }
+ }
+
return nullptr;
}
OpenPOWER on IntegriCloud