mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-08 20:06:03 +03:00
Merge branch 'master' into merge-2.067
This commit is contained in:
commit
80acadc841
4 changed files with 3 additions and 12 deletions
|
@ -827,7 +827,7 @@ void ldc::DIBuilder::EmitBlockEnd()
|
|||
|
||||
void ldc::DIBuilder::EmitStopPoint(Loc& loc)
|
||||
{
|
||||
if (!global.params.symdebug)
|
||||
if (!global.params.symdebug || !loc.linnum)
|
||||
return;
|
||||
|
||||
Logger::println("D to dwarf stoppoint at line %u, column %u", loc.linnum, loc.charnum);
|
||||
|
|
|
@ -1041,7 +1041,7 @@ void DtoDefineFunction(FuncDeclaration* fd)
|
|||
// in automatically, so we do it here.
|
||||
|
||||
// pass the previous block into this block
|
||||
gIR->DBuilder.EmitFuncEnd(fd);
|
||||
gIR->DBuilder.EmitStopPoint(fd->endloc);
|
||||
if (func->getReturnType() == LLType::getVoidTy(gIR->context())) {
|
||||
llvm::ReturnInst::Create(gIR->context(), gIR->scopebb());
|
||||
}
|
||||
|
@ -1058,6 +1058,7 @@ void DtoDefineFunction(FuncDeclaration* fd)
|
|||
else
|
||||
llvm::ReturnInst::Create(gIR->context(), LLConstant::getNullValue(func->getReturnType()), bb);
|
||||
}
|
||||
gIR->DBuilder.EmitFuncEnd(fd);
|
||||
|
||||
// erase alloca point
|
||||
if (allocaPoint->getParent())
|
||||
|
|
|
@ -208,9 +208,6 @@ void DtoAssert(Module* M, Loc& loc, DValue* msg)
|
|||
// call
|
||||
gIR->CreateCallOrInvoke(fn, args);
|
||||
|
||||
// end debug info
|
||||
gIR->DBuilder.EmitFuncEnd(gIR->func()->decl);
|
||||
|
||||
// after assert is always unreachable
|
||||
gIR->ir->CreateUnreachable();
|
||||
}
|
||||
|
|
|
@ -402,9 +402,6 @@ public:
|
|||
// emit scopes
|
||||
DtoEnclosingHandlers(stmt->loc, NULL);
|
||||
|
||||
// emit dbg end function
|
||||
gIR->DBuilder.EmitFuncEnd(f->decl);
|
||||
|
||||
// emit ret
|
||||
llvm::ReturnInst::Create(gIR->context(), irs->scopebb());
|
||||
}
|
||||
|
@ -466,7 +463,6 @@ public:
|
|||
// emit scopes
|
||||
DtoEnclosingHandlers(stmt->loc, NULL);
|
||||
|
||||
gIR->DBuilder.EmitFuncEnd(irs->func()->decl);
|
||||
llvm::ReturnInst::Create(gIR->context(), v, irs->scopebb());
|
||||
}
|
||||
}
|
||||
|
@ -475,7 +471,6 @@ public:
|
|||
{
|
||||
assert(irs->topfunc()->getReturnType() == LLType::getVoidTy(gIR->context()));
|
||||
DtoEnclosingHandlers(stmt->loc, NULL);
|
||||
gIR->DBuilder.EmitFuncEnd(irs->func()->decl);
|
||||
llvm::ReturnInst::Create(gIR->context(), irs->scopebb());
|
||||
}
|
||||
|
||||
|
@ -1096,8 +1091,6 @@ public:
|
|||
assert(stmt->exp);
|
||||
DValue* e = toElemDtor(stmt->exp);
|
||||
|
||||
gIR->DBuilder.EmitFuncEnd(gIR->func()->decl);
|
||||
|
||||
llvm::Function* fn = LLVM_D_GetRuntimeFunction(stmt->loc, gIR->module, "_d_throw_exception");
|
||||
//Logger::cout() << "calling: " << *fn << '\n';
|
||||
LLValue* arg = DtoBitCast(e->getRVal(), fn->getFunctionType()->getParamType(0));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue