summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
diff options
context:
space:
mode:
authorGordon Henriksen <gordonhenriksen@mac.com>2007-12-25 22:16:06 +0000
committerGordon Henriksen <gordonhenriksen@mac.com>2007-12-25 22:16:06 +0000
commit520e64c0c2140c00ddfa00368eca7fdb8723cec0 (patch)
treee92acc12813fbda8a1c2420718d592a91acb2f82 /llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
parentbea11173f5e8bb8f48495621a8437db8db94fad8 (diff)
downloadbcm5719-llvm-520e64c0c2140c00ddfa00368eca7fdb8723cec0.tar.gz
bcm5719-llvm-520e64c0c2140c00ddfa00368eca7fdb8723cec0.zip
Fixing several transforms which would drop the collector attribute
when copying functions. llvm-svn: 45356
Diffstat (limited to 'llvm/lib/Transforms/IPO/ArgumentPromotion.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/ArgumentPromotion.cpp2
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
OpenPOWER on IntegriCloud