mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-03-02 02:23:13 +01:00
[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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user