summaryrefslogtreecommitdiff
path: root/docs/tutorial/LangImpl4.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/tutorial/LangImpl4.html')
-rw-r--r--docs/tutorial/LangImpl4.html4
1 files changed, 2 insertions, 2 deletions
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()) {