Move types back to the 2.5 API.
[oota-llvm.git] / examples / Kaleidoscope / toy.cpp
index 6f7f0ee206f9df0814e5c2bdc2ae269a192c0f10..004c7b7c06183c36f8c476fa7ca5424301dfa012 100644 (file)
@@ -909,8 +909,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);