Fix class extends to use virtual destruction

This commit is contained in:
Wilson Snyder
2020-08-23 20:00:39 -04:00
parent 20206b1e2e
commit 3d073c9534
4 changed files with 13 additions and 2 deletions
+5 -1
View File
@@ -1095,7 +1095,11 @@ void AstClass::repairCache() {
clearCache();
for (AstNode* itemp = membersp(); itemp; itemp = itemp->nextp()) { insertCache(itemp); }
}
void AstClass::dump(std::ostream& str) const { this->AstNode::dump(str); }
void AstClass::dump(std::ostream& str) const {
this->AstNode::dump(str);
if (isExtended()) str << " [EXT]";
if (isVirtual()) str << " [VIRT]";
}
AstClass* AstClassExtends::classp() const {
AstClassRefDType* refp = VN_CAST(dtypep(), ClassRefDType);
UASSERT_OBJ(refp, this, "class extends non-ref");