random stuff

This commit is contained in:
Markus Hauschild
2013-06-01 22:36:15 +02:00
parent e4d4c06003
commit dccb0a7e97
3 changed files with 15 additions and 5 deletions

View File

@@ -276,6 +276,7 @@ void CodeGenVisitor::visit(RandomForStatement* e) {
llvm::BasicBlock* afterBB = llvm::BasicBlock::Create(llvm::getGlobalContext(), "afterLoop",f);
prob = builder_->CreateCall(cf,value_,"callTmp");
builder_->CreateCondBr(prob, loopBB, afterBB);
builder_->SetInsertPoint(afterBB);