Fix getOperand() for ReturnInst.
authorDevang Patel <dpatel@apple.com>
Tue, 11 Mar 2008 17:35:03 +0000 (17:35 +0000)
committerDevang Patel <dpatel@apple.com>
Tue, 11 Mar 2008 17:35:03 +0000 (17:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48229 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Instructions.h

index 82b138183a77116f6102d81d1b468b34af349b2c..3aa8d6879c2f3f5bfa4318e9bcd8ae8a12d464de 100644 (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: