mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-10 02:36:06 +00:00
Remove unnecessary getOperand/setOperand overriders.
Simplify getReturnValue() git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47614 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d4cf992230
commit
f8989657a7
@ -1405,25 +1405,12 @@ public:
|
|||||||
|
|
||||||
virtual ReturnInst *clone() const;
|
virtual ReturnInst *clone() const;
|
||||||
|
|
||||||
// Transparently provide more efficient getOperand methods.
|
Value *getReturnValue(unsigned n = 0) const {
|
||||||
Value *getOperand(unsigned i) const {
|
if (n == 0)
|
||||||
assert(i < getNumOperands() && "getOperand() out of range!");
|
|
||||||
if (getNumOperands() == 0 || getNumOperands() == 1)
|
|
||||||
return RetVal;
|
return RetVal;
|
||||||
|
return getOperand(n);
|
||||||
return OperandList[i];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void setOperand(unsigned i, Value *Val) {
|
|
||||||
assert(i < getNumOperands() && "setOperand() out of range!");
|
|
||||||
if (i == 0)
|
|
||||||
RetVal = Val;
|
|
||||||
else
|
|
||||||
OperandList[i] = Val;
|
|
||||||
}
|
|
||||||
|
|
||||||
Value *getReturnValue(unsigned n = 0) const;
|
|
||||||
|
|
||||||
unsigned getNumSuccessors() const { return 0; }
|
unsigned getNumSuccessors() const { return 0; }
|
||||||
|
|
||||||
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||||
|
@ -640,17 +640,6 @@ void ReturnInst::init(const Value * const* retVals, unsigned N) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Value *ReturnInst::getReturnValue(unsigned n) const {
|
|
||||||
if (getNumOperands() == 0)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
assert (n < getNumOperands() && "getReturnValue out of range!");
|
|
||||||
if (getNumOperands() == 1)
|
|
||||||
return RetVal;
|
|
||||||
else
|
|
||||||
return OperandList[n];
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned ReturnInst::getNumSuccessorsV() const {
|
unsigned ReturnInst::getNumSuccessorsV() const {
|
||||||
return getNumSuccessors();
|
return getNumSuccessors();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user