Remove IRScope::end

Specifying the basic block before which to insert the new one
is not mandatory when calling llvm::BasicBlock::Create. This
was the only use of the tracked "end" block. The concept was
phony anyway because there is no single "end" to a scope with
unwinding and so on.

For prettying up the IR, it is possible to change the order
of basic blocks using move{Before, After}().
This commit is contained in:
David Nadlinger 2015-08-16 23:31:24 +02:00
parent f3a79f1215
commit bfc20df4c8
11 changed files with 150 additions and 230 deletions

View file

@ -119,7 +119,7 @@ void FuncGen::prepareToDestructAllTemporariesOnThrow(IRState* irState)
// create landing pad
llvm::BasicBlock* landingpadbb = llvm::BasicBlock::Create(irState->context(),
"temporariesLandingPad", irState->topfunc(), irState->scopeend());
"temporariesLandingPad", irState->topfunc());
// set up the landing pad
landingPadInfo.addFinally(callDestructors, /* deleteOnPop = */ true);