Move types back to the 2.5 API.
[oota-llvm.git] / lib / Transforms / Utils / CloneFunction.cpp
index dae39b7a7903f00c6cca88c8766c0e41e7f44090..7b8a8a498bc8430325cec57c2327ae5e12475ed9 100644 (file)
@@ -151,8 +151,7 @@ Function *llvm::CloneFunction(const Function *F,
       ArgTypes.push_back(I->getType());
 
   // Create a new function type...
-  FunctionType *FTy =
-     F->getContext().getFunctionType(F->getFunctionType()->getReturnType(),
+  FunctionType *FTy = FunctionType::get(F->getFunctionType()->getReturnType(),
                                     ArgTypes, F->getFunctionType()->isVarArg());
 
   // Create the new function...