aboutsummaryrefslogtreecommitdiffstats
path: root/docs/tutorial/LangImpl3.html
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2008-04-19 22:25:09 +0000
committerGabor Greif <ggreif@gmail.com>2008-04-19 22:25:09 +0000
commitdf7d2b4ce89599ca75d4dc4fd581ce4507f73f2d (patch)
treefd73c200d859c64a6f81a6cc38ca5988602ad112 /docs/tutorial/LangImpl3.html
parentd881ad2c570dcb5965eb00b66462e1075ec82440 (diff)
downloadexternal_llvm-df7d2b4ce89599ca75d4dc4fd581ce4507f73f2d.zip
external_llvm-df7d2b4ce89599ca75d4dc4fd581ce4507f73f2d.tar.gz
external_llvm-df7d2b4ce89599ca75d4dc4fd581ce4507f73f2d.tar.bz2
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/LangImpl3.html')
-rw-r--r--docs/tutorial/LangImpl3.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/tutorial/LangImpl3.html b/docs/tutorial/LangImpl3.html
index 7f4b76a..f77f8f8 100644
--- a/docs/tutorial/LangImpl3.html
+++ b/docs/tutorial/LangImpl3.html
@@ -306,7 +306,7 @@ Function *PrototypeAST::Codegen() {
std::vector&lt;const Type*&gt; 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-&gt;Codegen()) {
@@ -1079,7 +1079,7 @@ Function *PrototypeAST::Codegen() {
std::vector&lt;const Type*&gt; 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-&gt;Codegen()) {