diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-05-14 12:21:56 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-05-14 12:21:56 +0000 |
| commit | bcefcf85522f16a429e6ce809cb471ab01e1aa97 (patch) | |
| tree | d3217ad44bcaff97dc9d9be6a30927564d398eb2 /llvm/lib/Transforms | |
| parent | 18b2c2f13c6541495746ffc43cb5fa56b8bb8c91 (diff) | |
| download | bcm5719-llvm-bcefcf85522f16a429e6ce809cb471ab01e1aa97.tar.gz bcm5719-llvm-bcefcf85522f16a429e6ce809cb471ab01e1aa97.zip | |
Make sure to preserve the calling convention when changing an invoke into
a call. This fixes Prolangs-C++/deriv2, kimwitu++, and Misc-C++/bigfib
on X86 with -enable-x86-fastcc.
llvm-svn: 22023
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index 5f023f1dd11..15ea761f2ce 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -1066,6 +1066,7 @@ bool llvm::SimplifyCFG(BasicBlock *BB) { std::vector<Value*> Args(II->op_begin()+3, II->op_end()); CallInst *CI = new CallInst(II->getCalledValue(), Args, II->getName(), BI); + CI->setCallingConv(II->getCallingConv()); // If the invoke produced a value, the Call now does instead II->replaceAllUsesWith(CI); delete II; @@ -1280,6 +1281,7 @@ bool llvm::SimplifyCFG(BasicBlock *BB) { std::vector<Value*> Args(II->op_begin()+3, II->op_end()); CallInst *CI = new CallInst(II->getCalledValue(), Args, II->getName(), BI); + CI->setCallingConv(II->getCallingConv()); // If the invoke produced a value, the Call does now instead. II->replaceAllUsesWith(CI); delete II; |

