[svn r125] Renamed/moved a few backend member inside DMD structures for consistency.

Unit tests are now implemented.
This commit is contained in:
Tomas Lindquist Olsen
2007-11-27 03:09:36 +01:00
parent 935dfae9c8
commit ea362d8402
17 changed files with 144 additions and 111 deletions

View File

@@ -57,12 +57,13 @@ void ReturnStatement::toIR(IRState* p)
if (p->topfunc()->getReturnType() == llvm::Type::VoidTy) {
assert(DtoIsPassedByRef(exptype));
TypeFunction* f = p->topfunctype();
assert(f->llvmRetInPtr && f->llvmRetArg);
IRFunction* f = p->func();
assert(f->type->llvmRetInPtr);
assert(f->decl->llvmRetArg);
if (global.params.symdebug) DtoDwarfStopPoint(loc.linnum);
DValue* rvar = new DVarValue(f->next, f->llvmRetArg, true);
DValue* rvar = new DVarValue(f->type->next, f->decl->llvmRetArg, true);
p->exps.push_back(IRExp(NULL,exp,rvar));
DValue* e = exp->toElem(p);
@@ -71,9 +72,9 @@ void ReturnStatement::toIR(IRState* p)
if (!e->inPlace())
DtoAssign(rvar, e);
IRFunction::FinallyVec& fin = p->func()->finallys;
IRFunction::FinallyVec& fin = f->finallys;
if (fin.empty()) {
if (global.params.symdebug) DtoDwarfFuncEnd(p->func()->decl);
if (global.params.symdebug) DtoDwarfFuncEnd(f->decl);
new llvm::ReturnInst(p->scopebb());
}
else {