[svn r120] ModuleInfo implementation is now almost complete.

Fixed some nasty static array-initializer bugs.
Fixed bug in DtoArrayLen and DtoArrayPtr for full slices of static arrays.
This commit is contained in:
Tomas Lindquist Olsen
2007-11-25 18:55:52 +01:00
parent c08b0918cc
commit cb37aab93b
12 changed files with 331 additions and 176 deletions

View File

@@ -368,10 +368,20 @@ void DtoDeclareFunction(FuncDeclaration* fdecl)
fdecl->llvmValue = func;
assert(llvm::isa<llvm::FunctionType>(f->llvmType->get()));
// main
if (fdecl->isMain()) {
gIR->mainFunc = func;
}
// static ctor
if (fdecl->isStaticCtorDeclaration()) {
gIR->ctors.push_back(fdecl);
}
// static dtor
else if (fdecl->isStaticDtorDeclaration()) {
gIR->dtors.push_back(fdecl);
}
// name parameters
llvm::Function::arg_iterator iarg = func->arg_begin();
int k = 0;