diff options
author | Chris Lattner <sabre@nondot.org> | 2005-05-09 01:05:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-05-09 01:05:50 +0000 |
commit | f201dbc1a4a638659ec3916785196e2c204c7755 (patch) | |
tree | d9bb7534a17fdd4ccf0878bf320c4852f038abb2 /lib/Transforms/IPO/PruneEH.cpp | |
parent | c154cef9a1e7db1afd42e4b227571debe7a986f5 (diff) | |
download | llvm-f201dbc1a4a638659ec3916785196e2c204c7755.tar.gz llvm-f201dbc1a4a638659ec3916785196e2c204c7755.tar.bz2 llvm-f201dbc1a4a638659ec3916785196e2c204c7755.tar.xz |
Preserve calling conventions when doing IPO
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21798 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/PruneEH.cpp')
-rw-r--r-- | lib/Transforms/IPO/PruneEH.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp index f7bf241882..7b979d36f2 100644 --- a/lib/Transforms/IPO/PruneEH.cpp +++ b/lib/Transforms/IPO/PruneEH.cpp @@ -144,10 +144,11 @@ bool PruneEH::SimplifyFunction(Function *F) { if (DoesNotUnwind.count(CG[F])) { // Insert a call instruction before the invoke... std::string Name = II->getName(); II->setName(""); - Value *Call = new CallInst(II->getCalledValue(), - std::vector<Value*>(II->op_begin()+3, - II->op_end()), - Name, II); + CallInst *Call = new CallInst(II->getCalledValue(), + std::vector<Value*>(II->op_begin()+3, + II->op_end()), + Name, II); + Call->setCallingConv(II->getCallingConv()); // Anything that used the value produced by the invoke instruction // now uses the value produced by the call instruction. |