merge of 49966 from branches/ggreif/use-diet to trunk. these are already active API changes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49968 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Gabor Greif
2008-04-19 22:25:09 +00:00
parent d881ad2c57
commit df7d2b4ce8
8 changed files with 48 additions and 48 deletions
+7 -7
View File
@@ -1722,9 +1722,9 @@ Value *IfExprAST::Codegen() {
// Create blocks for the then and else cases. Insert the 'then' block at the
// end of the function.
BasicBlock *ThenBB = new BasicBlock("then", TheFunction);
BasicBlock *ElseBB = new BasicBlock("else");
BasicBlock *MergeBB = new BasicBlock("ifcont");
BasicBlock *ThenBB = BasicBlock::Create("then", TheFunction);
BasicBlock *ElseBB = BasicBlock::Create("else");
BasicBlock *MergeBB = BasicBlock::Create("ifcont");
Builder.CreateCondBr(CondV, ThenBB, ElseBB);
@@ -1795,7 +1795,7 @@ Value *ForExprAST::Codegen() {
// Make the new basic block for the loop header, inserting after current
// block.
BasicBlock *PreheaderBB = Builder.GetInsertBlock();
BasicBlock *LoopBB = new BasicBlock("loop", TheFunction);
BasicBlock *LoopBB = BasicBlock::Create("loop", TheFunction);
// Insert an explicit fall through from the current block to the LoopBB.
Builder.CreateBr(LoopBB);
@@ -1841,7 +1841,7 @@ Value *ForExprAST::Codegen() {
// Create the "after loop" block and insert it.
BasicBlock *LoopEndBB = Builder.GetInsertBlock();
BasicBlock *AfterBB = new BasicBlock("afterloop", TheFunction);
BasicBlock *AfterBB = BasicBlock::Create("afterloop", TheFunction);
// Insert the conditional branch into the end of LoopEndBB.
Builder.CreateCondBr(EndCond, LoopBB, AfterBB);
@@ -1912,7 +1912,7 @@ Function *PrototypeAST::Codegen() {
std::vector<const Type*> Doubles(Args.size(), Type::DoubleTy);
FunctionType *FT = FunctionType::get(Type::DoubleTy, Doubles, false);
Function *F = new Function(FT, Function::ExternalLinkage, Name, TheModule);
Function *F = Function::Create(FT, Function::ExternalLinkage, Name, TheModule);
// If F conflicted, there was already something named 'Name'. If it has a
// body, don't allow redefinition or reextern.
@@ -1972,7 +1972,7 @@ Function *FunctionAST::Codegen() {
BinopPrecedence[Proto->getOperatorName()] = Proto->getBinaryPrecedence();
// Create a new basic block to start insertion into.
BasicBlock *BB = new BasicBlock("entry", TheFunction);
BasicBlock *BB = BasicBlock::Create("entry", TheFunction);
Builder.SetInsertPoint(BB);
// Add all arguments to the symbol table and create their allocas.