mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-02 16:11:08 +03:00
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:
parent
3c5e28d6c7
commit
e31070a437
5 changed files with 42 additions and 15 deletions
|
@ -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?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue