Move types back to the 2.5 API.
[oota-llvm.git] / docs / tutorial / LangImpl5.html
index 62a0dd973981ed2ca51f21a25a836c53de283923..8d77d5ec8928eeaff92604cacf393dccea89f4b8 100644 (file)
@@ -1551,7 +1551,7 @@ Value *ForExprAST::Codegen() {
 Function *PrototypeAST::Codegen() {
   // Make the function type:  double(double,double) etc.
   std::vector<const Type*> Doubles(Args.size(), Type::DoubleTy);
-  FunctionType *FT = getGlobalContext().getFunctionType(Type::DoubleTy, Doubles, false);
+  FunctionType *FT = FunctionType::get(Type::DoubleTy, Doubles, false);
   
   Function *F = Function::Create(FT, Function::ExternalLinkage, Name, TheModule);