diff options
author | Gabor Greif <ggreif@gmail.com> | 2008-04-19 22:25:09 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2008-04-19 22:25:09 +0000 |
commit | df7d2b4ce89599ca75d4dc4fd581ce4507f73f2d (patch) | |
tree | fd73c200d859c64a6f81a6cc38ca5988602ad112 /docs/tutorial | |
parent | d881ad2c570dcb5965eb00b66462e1075ec82440 (diff) |
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
Diffstat (limited to 'docs/tutorial')
-rw-r--r-- | docs/tutorial/JITTutorial1.html | 2 | ||||
-rw-r--r-- | docs/tutorial/JITTutorial2.html | 10 | ||||
-rw-r--r-- | docs/tutorial/LangImpl3.html | 8 | ||||
-rw-r--r-- | docs/tutorial/LangImpl4.html | 4 | ||||
-rw-r--r-- | docs/tutorial/LangImpl5.html | 24 | ||||
-rw-r--r-- | docs/tutorial/LangImpl6.html | 16 | ||||
-rw-r--r-- | docs/tutorial/LangImpl7.html | 14 |
7 files changed, 39 insertions, 39 deletions
diff --git a/docs/tutorial/JITTutorial1.html b/docs/tutorial/JITTutorial1.html index 4f57a53666..e280d927ac 100644 --- a/docs/tutorial/JITTutorial1.html +++ b/docs/tutorial/JITTutorial1.html @@ -142,7 +142,7 @@ Module* makeLLVMModule() { <div class="doc_code"> <pre> - BasicBlock* block = new BasicBlock("entry", mul_add); + BasicBlock* block = BasicBlock::Create("entry", mul_add); IRBuilder builder(block); </pre> </div> diff --git a/docs/tutorial/JITTutorial2.html b/docs/tutorial/JITTutorial2.html index ba3d043ade..1a4b05d458 100644 --- a/docs/tutorial/JITTutorial2.html +++ b/docs/tutorial/JITTutorial2.html @@ -98,11 +98,11 @@ Module* makeLLVMModule() { <div class="doc_code"> <pre> - BasicBlock* entry = new BasicBlock("entry", gcd); - BasicBlock* ret = new BasicBlock("return", gcd); - BasicBlock* cond_false = new BasicBlock("cond_false", gcd); - BasicBlock* cond_true = new BasicBlock("cond_true", gcd); - BasicBlock* cond_false_2 = new BasicBlock("cond_false", gcd); + BasicBlock* entry = BasicBlock::Create("entry", gcd); + BasicBlock* ret = BasicBlock::Create("return", gcd); + BasicBlock* cond_false = BasicBlock::Create("cond_false", gcd); + BasicBlock* cond_true = BasicBlock::Create("cond_true", gcd); + BasicBlock* cond_false_2 = BasicBlock::Create("cond_false", gcd); </pre> </div> diff --git a/docs/tutorial/LangImpl3.html b/docs/tutorial/LangImpl3.html index 7f4b76a554..f77f8f8303 100644 --- a/docs/tutorial/LangImpl3.html +++ b/docs/tutorial/LangImpl3.html @@ -306,7 +306,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); </pre> </div> @@ -435,7 +435,7 @@ is an LLVM Function object that is ready to go for us.</p> <div class="doc_code"> <pre> // Create a new basic block to start insertion into. - BasicBlock *BB = new BasicBlock("entry", TheFunction); + BasicBlock *BB = BasicBlock::Create("entry", TheFunction); Builder.SetInsertPoint(BB); if (Value *RetVal = Body->Codegen()) { @@ -1079,7 +1079,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. @@ -1122,7 +1122,7 @@ Function *FunctionAST::Codegen() { return 0; // Create a new basic block to start insertion into. - BasicBlock *BB = new BasicBlock("entry", TheFunction); + BasicBlock *BB = BasicBlock::Create("entry", TheFunction); Builder.SetInsertPoint(BB); if (Value *RetVal = Body->Codegen()) { diff --git a/docs/tutorial/LangImpl4.html b/docs/tutorial/LangImpl4.html index ddd609210d..b956260628 100644 --- a/docs/tutorial/LangImpl4.html +++ b/docs/tutorial/LangImpl4.html @@ -913,7 +913,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. @@ -956,7 +956,7 @@ Function *FunctionAST::Codegen() { return 0; // Create a new basic block to start insertion into. - BasicBlock *BB = new BasicBlock("entry", TheFunction); + BasicBlock *BB = BasicBlock::Create("entry", TheFunction); Builder.SetInsertPoint(BB); if (Value *RetVal = Body->Codegen()) { diff --git a/docs/tutorial/LangImpl5.html b/docs/tutorial/LangImpl5.html index ae53fd9f99..1ff4e65b4f 100644 --- a/docs/tutorial/LangImpl5.html +++ b/docs/tutorial/LangImpl5.html @@ -379,9 +379,9 @@ value as a 1-bit (bool) value.</p> // 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); </pre> @@ -727,7 +727,7 @@ block, but remember that the body code itself could consist of multiple blocks // block. Function *TheFunction = Builder.GetInsertBlock()->getParent(); 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); @@ -828,7 +828,7 @@ statement.</p> <pre> // 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); @@ -1417,9 +1417,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); @@ -1479,7 +1479,7 @@ Value *ForExprAST::Codegen() { // block. Function *TheFunction = Builder.GetInsertBlock()->getParent(); 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); @@ -1525,7 +1525,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); @@ -1552,7 +1552,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. @@ -1595,7 +1595,7 @@ Function *FunctionAST::Codegen() { return 0; // Create a new basic block to start insertion into. - BasicBlock *BB = new BasicBlock("entry", TheFunction); + BasicBlock *BB = BasicBlock::Create("entry", TheFunction); Builder.SetInsertPoint(BB); if (Value *RetVal = Body->Codegen()) { diff --git a/docs/tutorial/LangImpl6.html b/docs/tutorial/LangImpl6.html index 6059ad0e59..97eba53ed4 100644 --- a/docs/tutorial/LangImpl6.html +++ b/docs/tutorial/LangImpl6.html @@ -321,7 +321,7 @@ Function *FunctionAST::Codegen() { BinopPrecedence[Proto->getOperatorName()] = Proto->getBinaryPrecedence();</b> // Create a new basic block to start insertion into. - BasicBlock *BB = new BasicBlock("entry", TheFunction); + BasicBlock *BB = BasicBlock::Create("entry", TheFunction); Builder.SetInsertPoint(BB); if (Value *RetVal = Body->Codegen()) { @@ -1442,9 +1442,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); @@ -1504,7 +1504,7 @@ Value *ForExprAST::Codegen() { // block. Function *TheFunction = Builder.GetInsertBlock()->getParent(); 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); @@ -1550,7 +1550,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); @@ -1577,7 +1577,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. @@ -1624,7 +1624,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); if (Value *RetVal = Body->Codegen()) { diff --git a/docs/tutorial/LangImpl7.html b/docs/tutorial/LangImpl7.html index fc8f1302ff..be09f859b2 100644 --- a/docs/tutorial/LangImpl7.html +++ b/docs/tutorial/LangImpl7.html @@ -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. |