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 | 520e64c0c2140c00ddfa00368eca7fdb8723cec0 (patch) | |
tree | e92acc12813fbda8a1c2420718d592a91acb2f82 /llvm/lib/Linker/LinkModules.cpp | |
parent | bea11173f5e8bb8f48495621a8437db8db94fad8 (diff) | |
download | bcm5719-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/Linker/LinkModules.cpp')
-rw-r--r-- | llvm/lib/Linker/LinkModules.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp index 0f2afe54c97..3aea74e79d2 100644 --- a/llvm/lib/Linker/LinkModules.cpp +++ b/llvm/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()); } } |