[svn r319] Call substatement->toIR in LabelStatement::toIR even when the label is inside an asm block.

This commit is contained in:
Christian Kamm
2008-06-24 17:24:55 +02:00
parent 35263a7847
commit f621a5a77b

View File

@@ -1070,21 +1070,24 @@ void LabelStatement::toIR(IRState* p)
a->code += ident->toChars();
a->code += ":";
p->asmBlock->s.push_back(a);
return;
}
else
{
assert(tf == NULL);
llvm::BasicBlock* oldend = gIR->scopeend();
if (llvmBB)
llvmBB->moveBefore(oldend);
else
llvmBB = llvm::BasicBlock::Create("label", p->topfunc(), oldend);
if (!p->scopereturned())
llvm::BranchInst::Create(llvmBB, p->scopebb());
p->scope() = IRScope(llvmBB,oldend);
}
assert(tf == NULL);
llvm::BasicBlock* oldend = gIR->scopeend();
if (llvmBB)
llvmBB->moveBefore(oldend);
else
llvmBB = llvm::BasicBlock::Create("label", p->topfunc(), oldend);
if (!p->scopereturned())
llvm::BranchInst::Create(llvmBB, p->scopebb());
p->scope() = IRScope(llvmBB,oldend);
if (statement)
statement->toIR(p);
}