Skip to content

Commit

Permalink
Add ClassInfo flag for destructors.
Browse files Browse the repository at this point in the history
  • Loading branch information
Safety0ff committed Jul 6, 2014
1 parent ab10be3 commit afe3062
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/aggregate.h
Expand Up @@ -228,6 +228,7 @@ struct ClassFlags
hasTypeInfo = 0x20,
isAbstract = 0x40,
isCPPclass = 0x80,
hasDtor = 0x100,
};
};

Expand Down
8 changes: 8 additions & 0 deletions src/toobj.c
Expand Up @@ -368,6 +368,14 @@ void ClassDeclaration::toObjFile(bool multiobj)
flags |= ClassFlags::hasTypeInfo;
if (ctor)
flags |= ClassFlags::hasCtor;
for (ClassDeclaration *cd = this; cd; cd = cd->baseClass)
{
if (cd->dtor)
{
flags |= ClassFlags::hasDtor;
break;
}
}
if (isabstract)
flags |= ClassFlags::isAbstract;
for (ClassDeclaration *cd = this; cd; cd = cd->baseClass)
Expand Down

0 comments on commit afe3062

Please sign in to comment.