aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Linker
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
commit3e7ea1e79f0bdb067ad0f983bdacdfb00b0b19ad (patch)
treeb77faaa1cebd7341073265b7f230b82a86a80dc3 /lib/Linker
parent6c8de969de87d972212dd690aef18ac77bea0bea (diff)
downloadexternal_llvm-3e7ea1e79f0bdb067ad0f983bdacdfb00b0b19ad.zip
external_llvm-3e7ea1e79f0bdb067ad0f983bdacdfb00b0b19ad.tar.gz
external_llvm-3e7ea1e79f0bdb067ad0f983bdacdfb00b0b19ad.tar.bz2
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')
-rw-r--r--lib/Linker/LinkModules.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp
index 0f2afe5..3aea74e 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());
}
}