Move types back to the 2.5 API.
[oota-llvm.git] / docs / tutorial / LangImpl7.html
index d3ebd962c5c89ff83b8dc344dd3b9ed081957c16..844c48fff2351a6926074382d9b35ecb9435b45a 100644 (file)
@@ -1911,7 +1911,7 @@ Value *VarExprAST::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);