diff options
Diffstat (limited to 'lib/Transforms/Utils/CloneModule.cpp')
-rw-r--r-- | lib/Transforms/Utils/CloneModule.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Transforms/Utils/CloneModule.cpp b/lib/Transforms/Utils/CloneModule.cpp index e75f915cb9..c94c531b01 100644 --- a/lib/Transforms/Utils/CloneModule.cpp +++ b/lib/Transforms/Utils/CloneModule.cpp @@ -65,10 +65,7 @@ Module *llvm::CloneModule(const Module *M, Function *NF = Function::Create(cast<FunctionType>(I->getType()->getElementType()), GlobalValue::ExternalLinkage, I->getName(), New); - NF->setCallingConv(I->getCallingConv()); - NF->setParamAttrs(I->getParamAttrs()); - if (I->hasCollector()) - NF->setCollector(I->getCollector()); + NF->copyAttributesFrom(I); ValueMap[I]= NF; } |