diff options
author | Duncan Sands <baldrick@free.fr> | 2007-11-27 13:23:08 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2007-11-27 13:23:08 +0000 |
commit | dc024674ff96820d6020757b48d47f46d4c07db2 (patch) | |
tree | 843dfcaeb8f6c99de930a32020148b563005c2fd /lib/Transforms/Utils/CloneModule.cpp | |
parent | f19341dec7361451f100a882a023b14583454d7e (diff) |
Fix PR1146: parameter attributes are longer part of
the function type, instead they belong to functions
and function calls. This is an updated and slightly
corrected version of Reid Spencer's original patch.
The only known problem is that auto-upgrading of
bitcode files doesn't seem to work properly (see
test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully
a bitcode guru (who might that be? :) ) will fix it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44359 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/CloneModule.cpp')
-rw-r--r-- | lib/Transforms/Utils/CloneModule.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/CloneModule.cpp b/lib/Transforms/Utils/CloneModule.cpp index cd9f4b6cac..201da5be9a 100644 --- a/lib/Transforms/Utils/CloneModule.cpp +++ b/lib/Transforms/Utils/CloneModule.cpp @@ -66,6 +66,7 @@ Module *llvm::CloneModule(const Module *M, new Function(cast<FunctionType>(I->getType()->getElementType()), GlobalValue::ExternalLinkage, I->getName(), New); NF->setCallingConv(I->getCallingConv()); + NF->setParamAttrs(I->getParamAttrs()); ValueMap[I]= NF; } @@ -120,5 +121,3 @@ Module *llvm::CloneModule(const Module *M, return New; } - -// vim: sw=2 |