From 520e64c0c2140c00ddfa00368eca7fdb8723cec0 Mon Sep 17 00:00:00 2001 From: Gordon Henriksen Date: Tue, 25 Dec 2007 22:16:06 +0000 Subject: Fixing several transforms which would drop the collector attribute when copying functions. llvm-svn: 45356 --- llvm/lib/Linker/LinkModules.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/Linker/LinkModules.cpp') 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(DestGV); DestF->setCallingConv(SrcF->getCallingConv()); DestF->setParamAttrs(SrcF->getParamAttrs()); + if (SrcF->hasCollector()) + DestF->setCollector(SrcF->getCollector()); } } -- cgit v1.2.3