Ensure that a proper bb is created when "else" is omitted in a branch.
This commit is contained in:
parent
d7fe87ee6e
commit
3dc5dc604a
|
@ -497,6 +497,8 @@ bool BitcodeEmitter::emit(Branch const& node) {
|
||||||
|
|
||||||
if (body.getElse()) {
|
if (body.getElse()) {
|
||||||
GUARDED(ensureBasicBlock(*body.getElse(), mergebb));
|
GUARDED(ensureBasicBlock(*body.getElse(), mergebb));
|
||||||
|
} else {
|
||||||
|
d->builder.CreateBr(mergebb);
|
||||||
}
|
}
|
||||||
|
|
||||||
func->getBasicBlockList().push_back(mergebb);
|
func->getBasicBlockList().push_back(mergebb);
|
||||||
|
|
Reference in New Issue
Block a user