mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-01 23:50:43 +03:00
eh unwinding: don't alloc data in parent frame, just use nullptr for now
This commit is contained in:
parent
83368904d1
commit
d8bbc0491d
1 changed files with 4 additions and 7 deletions
|
@ -273,7 +273,7 @@ llvm::BasicBlock *ScopeStack::runCleanupPad(CleanupCursor scope,
|
|||
//
|
||||
// cleanuppad:
|
||||
// %0 = cleanuppad within %funclet[]
|
||||
// %frame = alloca(byte[16])
|
||||
// %frame = nullptr
|
||||
// if (!_d_enter_cleanup(%frame)) br label %cleanupret
|
||||
// else br label %copy
|
||||
//
|
||||
|
@ -292,12 +292,9 @@ llvm::BasicBlock *ScopeStack::runCleanupPad(CleanupCursor scope,
|
|||
llvm::BasicBlock *cleanupret =
|
||||
llvm::BasicBlock::Create(irs->context(), "cleanupret", irs->topfunc());
|
||||
|
||||
// allocate some space on the stack where _d_enter_cleanup can place an exception frame
|
||||
auto int8Ty = LLType::getInt8Ty(gIR->context());
|
||||
auto frametype = llvm::ArrayType::get(int8Ty, 16);
|
||||
auto frameai = DtoRawAlloca(frametype, 0, "cleanup.frame");
|
||||
auto frame =
|
||||
new llvm::BitCastInst(frameai, getPtrToType(int8Ty), "", cleanupbb);
|
||||
// preparation to allocate some space on the stack where _d_enter_cleanup
|
||||
// can place an exception frame (but not done here)
|
||||
auto frame = getNullPtr(getVoidPtrType());
|
||||
|
||||
auto endFn = getRuntimeFunction(Loc(), irs->module, "_d_leave_cleanup");
|
||||
llvm::CallInst::Create(endFn, frame,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue