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/SimplifyCFG.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/SimplifyCFG.cpp')
-rw-r--r-- | lib/Transforms/Utils/SimplifyCFG.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp index 470daf36fe..1305fd92c7 100644 --- a/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/lib/Transforms/Utils/SimplifyCFG.cpp @@ -1376,6 +1376,7 @@ bool llvm::SimplifyCFG(BasicBlock *BB) { CallInst *CI = new CallInst(II->getCalledValue(), Args.begin(), Args.end(), II->getName(), BI); CI->setCallingConv(II->getCallingConv()); + CI->setParamAttrs(II->getParamAttrs()); // If the invoke produced a value, the Call now does instead II->replaceAllUsesWith(CI); delete II; @@ -1751,6 +1752,7 @@ bool llvm::SimplifyCFG(BasicBlock *BB) { Args.begin(), Args.end(), II->getName(), BI); CI->setCallingConv(II->getCallingConv()); + CI->setParamAttrs(II->getParamAttrs()); // If the invoke produced a value, the Call does now instead. II->replaceAllUsesWith(CI); delete II; |