diff options
Diffstat (limited to 'llvm/lib/Transforms/Scalar/ADCE.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/ADCE.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/ADCE.cpp b/llvm/lib/Transforms/Scalar/ADCE.cpp index 7307ff813a2..65e816e2e81 100644 --- a/llvm/lib/Transforms/Scalar/ADCE.cpp +++ b/llvm/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); |

