mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-07 12:28:24 +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:
@@ -270,7 +270,15 @@ Init *RecordRecTy::convertValue(TypedInit *TI) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool RecordRecTy::baseClassOf(const RecordRecTy *RHS) const {
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user