summaryrefslogtreecommitdiff
path: root/lib/VMCore/Instructions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VMCore/Instructions.cpp')
-rw-r--r--lib/VMCore/Instructions.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp
index 39ba4df15b..5d063c980f 100644
--- a/lib/VMCore/Instructions.cpp
+++ b/lib/VMCore/Instructions.cpp
@@ -2120,17 +2120,6 @@ bool CastInst::isNoopCast(Type *IntPtrTy) const {
return isNoopCast(getOpcode(), getOperand(0)->getType(), getType(), IntPtrTy);
}
-/// @brief Determine if a cast is a no-op
-bool CastInst::isNoopCast(const DataLayout &DL) const {
- unsigned AS = 0;
- if (getOpcode() == Instruction::PtrToInt)
- AS = getOperand(0)->getType()->getPointerAddressSpace();
- else if (getOpcode() == Instruction::IntToPtr)
- AS = getType()->getPointerAddressSpace();
- Type *IntPtrTy = DL.getIntPtrType(getContext(), AS);
- return isNoopCast(getOpcode(), getOperand(0)->getType(), getType(), IntPtrTy);
-}
-
/// This function determines if a pair of casts can be eliminated and what
/// opcode should be used in the elimination. This assumes that there are two
/// instructions like this: