Fixed problems with nested 'this'. Fixes #39 .

Fixed problem with debug info order of intrinsic calls (func.start after declare).
This commit is contained in:
Tomas Lindquist Olsen 2008-08-02 00:50:39 +02:00
parent 3c5e28d6c7
commit e31070a437
5 changed files with 42 additions and 15 deletions

View file

@ -559,6 +559,9 @@ void DtoDefineFunc(FuncDeclaration* fd)
llvm::Instruction* allocaPoint = new llvm::AllocaInst(LLType::Int32Ty, "alloca point", beginbb);
gIR->func()->allocapoint = allocaPoint;
// debug info - after all allocas, but before any llvm.dbg.declare etc
if (global.params.symdebug) DtoDwarfFuncStart(fd);
// need result variable? (not nested)
if (fd->vresult && !fd->vresult->nestedref) {
Logger::println("non-nested vresult value");
@ -625,9 +628,6 @@ void DtoDefineFunc(FuncDeclaration* fd)
}
}
// debug info
if (global.params.symdebug) DtoDwarfFuncStart(fd);
LLValue* parentNested = NULL;
if (FuncDeclaration* fd2 = fd->toParent2()->isFuncDeclaration()) {
if (!fd->isStatic()) // huh?