Fix bug in StmtList::EmitCode()

Previously, we would return immediately if the current basic block
was NULL; however, this is the wrong thing to do in that goto labels
and case/default labels in switch statements will establish a new
current basic block even if the current one is NULL.
This commit is contained in:
Matt Pharr
2012-01-11 09:14:39 -08:00
parent 8a8e1a7f73
commit 0223bb85ee

View File

@@ -2046,9 +2046,6 @@ LabeledStmt::EstimateCost() const {
void
StmtList::EmitCode(FunctionEmitContext *ctx) const {
if (!ctx->GetCurrentBasicBlock())
return;
ctx->StartScope();
ctx->SetDebugPos(pos);
for (unsigned int i = 0; i < stmts.size(); ++i)