diff options
author | Gordon Henriksen <gordonhenriksen@mac.com> | 2007-12-25 22:16:06 +0000 |
---|---|---|
committer | Gordon Henriksen <gordonhenriksen@mac.com> | 2007-12-25 22:16:06 +0000 |
commit | 194c90ed2a8e74b5a1c5184835f84c572d524dad (patch) | |
tree | b77faaa1cebd7341073265b7f230b82a86a80dc3 /lib/Linker/LinkModules.cpp | |
parent | 64910eeec481c90640a374e27011644217ebb130 (diff) |
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/Linker/LinkModules.cpp')
-rw-r--r-- | lib/Linker/LinkModules.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index 0f2afe54c9..3aea74e79d 100644 --- a/lib/Linker/LinkModules.cpp +++ b/lib/Linker/LinkModules.cpp @@ -359,6 +359,8 @@ static void CopyGVAttributes(GlobalValue *DestGV, const GlobalValue *SrcGV) { Function *DestF = cast<Function>(DestGV); DestF->setCallingConv(SrcF->getCallingConv()); DestF->setParamAttrs(SrcF->getParamAttrs()); + if (SrcF->hasCollector()) + DestF->setCollector(SrcF->getCollector()); } } |