Added pointers to shared constructors and destructors to ModuleInfo.

This commit is contained in:
Alexey Prokhin 2010-11-05 17:40:29 +03:00
parent 171ef1695c
commit 14c6dfb895
4 changed files with 78 additions and 82 deletions

View file

@ -513,6 +513,18 @@ void DtoDeclareFunction(FuncDeclaration* fdecl)
gIR->dtors.push_back(fdecl);
}
}
// shared static ctor
else if (fdecl->isSharedStaticCtorDeclaration()) {
if (mustDefineSymbol(fdecl)) {
gIR->sharedCtors.push_back(fdecl);
}
}
// static dtor
else if (fdecl->isSharedStaticDtorDeclaration()) {
if (mustDefineSymbol(fdecl)) {
gIR->sharedDtors.push_back(fdecl);
}
}
// we never reference parameters of function prototypes
std::string str;