summaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/ValueMapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Utils/ValueMapper.cpp')
-rw-r--r--lib/Transforms/Utils/ValueMapper.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/Transforms/Utils/ValueMapper.cpp b/lib/Transforms/Utils/ValueMapper.cpp
index a70d6d769b..54c7688723 100644
--- a/lib/Transforms/Utils/ValueMapper.cpp
+++ b/lib/Transforms/Utils/ValueMapper.cpp
@@ -13,7 +13,6 @@
//===----------------------------------------------------------------------===//
#include "llvm/Transforms/Utils/ValueMapper.h"
-#include "llvm/IR/CallSite.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/InlineAsm.h"
@@ -385,16 +384,6 @@ void llvm::RemapInstruction(Instruction *I, ValueToValueMapTy &VMap,
}
// If the instruction's type is being remapped, do so now.
- if (auto CS = CallSite(I)) {
- SmallVector<Type *, 3> Tys;
- FunctionType *Old = CS.getFunctionType();
- unsigned NumOld = Old->getNumParams();
- assert(NumOld <= CS.arg_size());
- for (unsigned i = 0; i != NumOld; ++i)
- Tys.push_back(CS.getArgument(i)->getType());
- CS.mutateFunctionType(FunctionType::get(
- TypeMapper ? TypeMapper->remapType(I->getType()) : I->getType(), Tys,
- Old->isVarArg()));
- } else if (TypeMapper)
+ if (TypeMapper)
I->mutateType(TypeMapper->remapType(I->getType()));
}