summaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/ADCE.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-05-14 12:25:32 +0000
committerChris Lattner <sabre@nondot.org>2005-05-14 12:25:32 +0000
commite43702695dd4500c2a11671f9d353b5cc6b2603b (patch)
tree41d38fa9675b7212e2d875eee28e2ebfb7ff5b0e /lib/Transforms/Scalar/ADCE.cpp
parent16d0db2da8c274f98db4a89ca7a92f970d464b9a (diff)
downloadllvm-e43702695dd4500c2a11671f9d353b5cc6b2603b.tar.gz
llvm-e43702695dd4500c2a11671f9d353b5cc6b2603b.tar.bz2
llvm-e43702695dd4500c2a11671f9d353b5cc6b2603b.tar.xz
preserve calling conventions when hacking on code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22024 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/ADCE.cpp')
-rw-r--r--lib/Transforms/Scalar/ADCE.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp
index 7307ff813a..65e816e2e8 100644
--- a/lib/Transforms/Scalar/ADCE.cpp
+++ b/lib/Transforms/Scalar/ADCE.cpp
@@ -188,7 +188,8 @@ bool ADCE::doADCE() {
// after it to the normal destination.
std::vector<Value*> Args(II->op_begin()+3, II->op_end());
std::string Name = II->getName(); II->setName("");
- Instruction *NewCall = new CallInst(F, Args, Name, II);
+ CallInst *NewCall = new CallInst(F, Args, Name, II);
+ NewCall->setCallingConv(II->getCallingConv());
II->replaceAllUsesWith(NewCall);
new BranchInst(II->getNormalDest(), II);