Fix portable build
Fix exit block handling.
Change-Id: I7a409e36bc602160e8b145b31419af114837cd3a
diff --git a/src/compiler/codegen/mir_to_gbc.cc b/src/compiler/codegen/mir_to_gbc.cc
index ba90269..79ac242 100644
--- a/src/compiler/codegen/mir_to_gbc.cc
+++ b/src/compiler/codegen/mir_to_gbc.cc
@@ -1018,7 +1018,7 @@
}
EmitPopShadowFrame(cu);
cu->irb->CreateRet(GetLLVMValue(cu, rl_src[0].orig_sreg));
- DCHECK(bb->has_return);
+ bb->has_return = true;
}
break;
@@ -1028,7 +1028,7 @@
}
EmitPopShadowFrame(cu);
cu->irb->CreateRetVoid();
- DCHECK(bb->has_return);
+ bb->has_return = true;
}
break;
diff --git a/src/compiler/frontend.cc b/src/compiler/frontend.cc
index 6eb117a..44baea2 100644
--- a/src/compiler/frontend.cc
+++ b/src/compiler/frontend.cc
@@ -972,7 +972,6 @@
cur_block = ProcessCanBranch(cu.get(), cur_block, insn, cur_offset,
width, flags, code_ptr, code_end);
} else if (flags & Instruction::kReturn) {
- cur_block->has_return = true;
cur_block->fall_through = exit_block;
InsertGrowableList(cu.get(), exit_block->predecessors,
reinterpret_cast<uintptr_t>(cur_block));