comparison gen/asmstmt.cpp @ 1545:7fcb72d518f6

More factory methods moved to LLVMContext
author Benjamin Kramer <benny.kra@gmail.com>
date Wed, 15 Jul 2009 18:09:41 +0200
parents 2292878925f4
children d6e8d5db259f
comparison
equal deleted inserted replaced
1544:8863cf7236e6 1545:7fcb72d518f6
767 // add all cases 767 // add all cases
768 std::map<Identifier*, int>::iterator it, end = gotoToVal.end(); 768 std::map<Identifier*, int>::iterator it, end = gotoToVal.end();
769 for(it = gotoToVal.begin(); it != end; ++it) 769 for(it = gotoToVal.begin(); it != end; ++it)
770 { 770 {
771 llvm::BasicBlock* casebb = llvm::BasicBlock::Create("case", p->topfunc(), bb); 771 llvm::BasicBlock* casebb = llvm::BasicBlock::Create("case", p->topfunc(), bb);
772 sw->addCase(llvm::ConstantInt::get(llvm::IntegerType::get(32), it->second), casebb); 772 sw->addCase(gIR->context().getConstantInt(llvm::IntegerType::get(32), it->second), casebb);
773 773
774 p->scope() = IRScope(casebb,bb); 774 p->scope() = IRScope(casebb,bb);
775 DtoGoto(loc, it->first, enclosingFinally); 775 DtoGoto(loc, it->first, enclosingFinally);
776 } 776 }
777 777