diff options
author | Devang Patel <dpatel@apple.com> | 2008-03-11 17:35:03 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2008-03-11 17:35:03 +0000 |
commit | 1eafa06411c9b18d667e828cdcd107937804f88c (patch) | |
tree | 4f8992d4f7f57a6f0f3001f4a192a8cb4a41c60b | |
parent | 826c49132a9cba1e08a5fce78d05561d9a3746ce (diff) |
Fix getOperand() for ReturnInst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48229 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Instructions.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index 82b138183a..3aa8d6879c 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -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: |