mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-10 21:06:33 +03:00
Cleanup runtime fwd decls and use ABI functiontype rewriting
This commit is contained in:
parent
417e3d242d
commit
70a6e73188
15 changed files with 347 additions and 594 deletions
|
@ -291,13 +291,13 @@ llvm::LandingPadInst *createLandingPadInst(IRState *irs) {
|
|||
LLFunction *currentFunction = irs->func()->func;
|
||||
if (!currentFunction->hasPersonalityFn()) {
|
||||
LLFunction *personalityFn =
|
||||
LLVM_D_GetRuntimeFunction(Loc(), irs->module, "_d_eh_personality");
|
||||
getRuntimeFunction(Loc(), irs->module, "_d_eh_personality");
|
||||
currentFunction->setPersonalityFn(personalityFn);
|
||||
}
|
||||
return irs->ir->CreateLandingPad(retType, 0);
|
||||
#else
|
||||
LLFunction *personalityFn =
|
||||
LLVM_D_GetRuntimeFunction(Loc(), irs->module, "_d_eh_personality");
|
||||
getRuntimeFunction(Loc(), irs->module, "_d_eh_personality");
|
||||
return irs->ir->CreateLandingPad(retType, personalityFn, 0);
|
||||
#endif
|
||||
}
|
||||
|
@ -424,7 +424,7 @@ llvm::BasicBlock *IrFunction::getOrCreateResumeUnwindBlock() {
|
|||
gIR->scope() = IRScope(resumeUnwindBlock);
|
||||
|
||||
llvm::Function *resumeFn =
|
||||
LLVM_D_GetRuntimeFunction(Loc(), gIR->module, "_d_eh_resume_unwind");
|
||||
getRuntimeFunction(Loc(), gIR->module, "_d_eh_resume_unwind");
|
||||
gIR->ir->CreateCall(resumeFn, gIR->ir->CreateLoad(getOrCreateEhPtrSlot()));
|
||||
gIR->ir->CreateUnreachable();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue