summaryrefslogtreecommitdiff
path: root/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
commit194c90ed2a8e74b5a1c5184835f84c572d524dad (patch)
treeb77faaa1cebd7341073265b7f230b82a86a80dc3 /lib/Transforms/IPO/ArgumentPromotion.cpp
parent64910eeec481c90640a374e27011644217ebb130 (diff)
downloadllvm-194c90ed2a8e74b5a1c5184835f84c572d524dad.tar.gz
llvm-194c90ed2a8e74b5a1c5184835f84c572d524dad.tar.bz2
llvm-194c90ed2a8e74b5a1c5184835f84c572d524dad.tar.xz
Fixing several transforms which would drop the collector attribute
when copying functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45356 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/ArgumentPromotion.cpp')
-rw-r--r--lib/Transforms/IPO/ArgumentPromotion.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp
index 26d8853891..c66b28524e 100644
--- a/lib/Transforms/IPO/ArgumentPromotion.cpp
+++ b/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