Add support for the new va_arg instruction
[oota-llvm.git] / lib / Transforms / IPO / PoolAllocate.cpp
index b2efc12de2768b37a6f437e53780a9abedfb7631..844d0c15ffab5f35b4896d394e70a072305a4b2b 100644 (file)
@@ -161,7 +161,8 @@ Function *PoolAllocate::MakeFunctionClone(Function &F) {
   FunctionType *FuncTy = FunctionType::get(OldFuncTy->getReturnType(), ArgTys,
                                            OldFuncTy->isVarArg());
   // Create the new function...
-  Function *New = new Function(FuncTy, true, F.getName(), F.getParent());
+  Function *New = new Function(FuncTy, GlobalValue::InternalLinkage,
+                               F.getName(), F.getParent());
 
   // Set the rest of the new arguments names to be PDa<n> and add entries to the
   // pool descriptors map