diff options
Diffstat (limited to 'llvm/lib/Transforms/IPO/ArgumentPromotion.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/ArgumentPromotion.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp index 26d8853891e..c66b28524eb 100644 --- a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -424,6 +424,8 @@ Function *ArgPromotion::DoPromotion(Function *F, Function *NF = new Function(NFTy, F->getLinkage(), F->getName()); NF->setCallingConv(F->getCallingConv()); NF->setParamAttrs(PAL); + if (F->hasCollector()) + NF->setCollector(F->getCollector()); F->getParent()->getFunctionList().insert(F, NF); // Get the alias analysis information that we need to update to reflect our |