Fix getOperand() for ReturnInst.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48229 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2008-03-11 17:35:03 +00:00
parent 826c49132a
commit 1eafa06411

View File

@ -1420,13 +1420,17 @@ public:
virtual ReturnInst *clone() const;
Value *getReturnValue(unsigned n = 0) const {
Value *getOperand(unsigned n = 0) const {
if (getNumOperands() > 1)
return getOperand(n);
return TerminatorInst::getOperand(n);
else
return RetVal;
}
Value *getReturnValue(unsigned n = 0) const {
return getOperand(n);
}
unsigned getNumSuccessors() const { return 0; }
// Methods for support type inquiry through isa, cast, and dyn_cast: