Adding a collector name attribute to Function in the IR. These
[oota-llvm.git] / lib / Transforms / Utils / CloneModule.cpp
index 201da5be9af0cbf52083df21849fd86eae7ccb50..cc645a9bd82a66452c5f16f03a4010a3e958dc9f 100644 (file)
@@ -67,6 +67,8 @@ Module *llvm::CloneModule(const Module *M,
                    GlobalValue::ExternalLinkage, I->getName(), New);
     NF->setCallingConv(I->getCallingConv());
     NF->setParamAttrs(I->getParamAttrs());
+    if (I->hasCollector())
+      NF->setCollector(I->getCollector());
     ValueMap[I]= NF;
   }