mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-09-17 19:07:05 +02:00
[svn r19] * Added support for reassigning 'this' inside class constructors.
* Added preliminary support for UnrolledLoopStatement. That is foreach on a tuple.
This commit is contained in:
+13
@@ -665,9 +665,20 @@ void FuncDeclaration::toObjFile()
|
||||
// function definition
|
||||
if (allow_fbody && fbody != 0)
|
||||
{
|
||||
gIR->funcdecls.push_back(this);
|
||||
|
||||
// first make absolutely sure the type is up to date
|
||||
f->llvmType = llvmValue->getType()->getContainedType(0);
|
||||
|
||||
// this handling
|
||||
if (f->llvmUsesThis) {
|
||||
if (f->llvmRetInPtr)
|
||||
llvmThisVar = ++func->arg_begin();
|
||||
else
|
||||
llvmThisVar = func->arg_begin();
|
||||
assert(llvmThisVar != 0);
|
||||
}
|
||||
|
||||
if (isMain())
|
||||
gIR->emitMain = true;
|
||||
|
||||
@@ -716,6 +727,8 @@ void FuncDeclaration::toObjFile()
|
||||
// possibly assert(lastbb->getNumPredecessors() == 0); ??? try it out sometime ...
|
||||
new llvm::UnreachableInst(lastbb);
|
||||
}
|
||||
|
||||
gIR->funcdecls.pop_back();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user