diff options
Diffstat (limited to 'lib/Transforms/IPO/ExtractGV.cpp')
-rw-r--r-- | lib/Transforms/IPO/ExtractGV.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Transforms/IPO/ExtractGV.cpp b/lib/Transforms/IPO/ExtractGV.cpp index 46232b880b..03a8e5cebc 100644 --- a/lib/Transforms/IPO/ExtractGV.cpp +++ b/lib/Transforms/IPO/ExtractGV.cpp @@ -123,10 +123,7 @@ namespace { if (std::find(Named.begin(), Named.end(), &*I) == Named.end()) { Function *New = Function::Create(I->getFunctionType(), GlobalValue::ExternalLinkage); - New->setCallingConv(I->getCallingConv()); - New->setParamAttrs(I->getParamAttrs()); - if (I->hasCollector()) - New->setCollector(I->getCollector()); + New->copyAttributesFrom(I); // If it's not the named function, delete the body of the function I->dropAllReferences(); |