Refactoring: Improve Ir{Aggr,Class,Struct} encapsulation

This commit is contained in:
Martin Kinkelin 2020-07-18 12:20:33 +02:00
parent a765bf8901
commit e9021fd6c8
6 changed files with 122 additions and 112 deletions

View file

@ -487,12 +487,8 @@ class DeclareOrDefineVisitor : public Visitor {
return;
}
LLConstant *init = irstruct->getTypeInfoInit(); // might define ti!
if (!ti->hasInitializer()) {
defineGlobal(ti, init, sd);
ti->setLinkage(TYPEINFO_LINKAGE_TYPE); // override
}
irstruct->getTypeInfoSymbol(/*define=*/true);
ti->setLinkage(TYPEINFO_LINKAGE_TYPE); // override
}
// Only declare class TypeInfos. They are defined once in their owning module