mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
In case Rec is a definition and not a class, do the proper comparison!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106246 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3bf9125933
commit
93583c97f8
@ -270,7 +270,15 @@ Init *RecordRecTy::convertValue(TypedInit *TI) {
|
||||
}
|
||||
|
||||
bool RecordRecTy::baseClassOf(const RecordRecTy *RHS) const {
|
||||
return Rec == RHS->getRecord() || RHS->getRecord()->isSubClassOf(Rec);
|
||||
if (Rec == RHS->getRecord() || RHS->getRecord()->isSubClassOf(Rec))
|
||||
return true;
|
||||
|
||||
const std::vector<Record*> &SC = Rec->getSuperClasses();
|
||||
for (unsigned i = 0, e = SC.size(); i != e; ++i)
|
||||
if (RHS->getRecord()->isSubClassOf(SC[i]))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user