aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Constants.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2021-08-27 08:42:57 -0700
committerKazu Hirata <kazu@google.com>2021-08-27 08:42:57 -0700
commit72bbd1559e75b1e32c7669c4ef7cfa85efc47aef (patch)
treee91af6ae163a138360ff7786adaf152a094f01f8 /llvm/lib/IR/Constants.cpp
parent8ea3e9d9a2640097e10fe0bc80a0d670831bced6 (diff)
downloadllvm-72bbd1559e75b1e32c7669c4ef7cfa85efc47aef.zip
llvm-72bbd1559e75b1e32c7669c4ef7cfa85efc47aef.tar.gz
llvm-72bbd1559e75b1e32c7669c4ef7cfa85efc47aef.tar.bz2
[IR] Remove getWithOperandReplaced (NFC)
The function hasn't been used for at least 10 years.
Diffstat (limited to 'llvm/lib/IR/Constants.cpp')
-rw-r--r--llvm/lib/IR/Constants.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/llvm/lib/IR/Constants.cpp b/llvm/lib/IR/Constants.cpp
index b39aa6b..28395a62 100644
--- a/llvm/lib/IR/Constants.cpp
+++ b/llvm/lib/IR/Constants.cpp
@@ -1508,20 +1508,6 @@ Constant *ConstantExpr::getShuffleMaskForBitcode() const {
return cast<ShuffleVectorConstantExpr>(this)->ShuffleMaskForBitcode;
}
-Constant *
-ConstantExpr::getWithOperandReplaced(unsigned OpNo, Constant *Op) const {
- assert(Op->getType() == getOperand(OpNo)->getType() &&
- "Replacing operand with value of different type!");
- if (getOperand(OpNo) == Op)
- return const_cast<ConstantExpr*>(this);
-
- SmallVector<Constant*, 8> NewOps;
- for (unsigned i = 0, e = getNumOperands(); i != e; ++i)
- NewOps.push_back(i == OpNo ? Op : getOperand(i));
-
- return getWithOperands(NewOps);
-}
-
Constant *ConstantExpr::getWithOperands(ArrayRef<Constant *> Ops, Type *Ty,
bool OnlyIfReduced, Type *SrcTy) const {
assert(Ops.size() == getNumOperands() && "Operand count mismatch!");