Remove compatibilty code for old-style multiple return values.
authorDan Gohman <gohman@apple.com>
Wed, 6 Oct 2010 16:59:24 +0000 (16:59 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 6 Oct 2010 16:59:24 +0000 (16:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115799 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Instructions.h

index a17fb9fc19717d9510bd2e712d16e00631c08c4d..a7be756c0bc819fe991263d46fb9ac024029c672 100644 (file)
@@ -1989,11 +1989,9 @@ public:
   /// Provide fast operand accessors
   DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
 
-  /// Convenience accessor
-  Value *getReturnValue(unsigned n = 0) const {
-    return n < getNumOperands()
-      ? getOperand(n)
-      : 0;
+  /// Convenience accessor. Returns null if there is no return value.
+  Value *getReturnValue() const {
+    return getNumOperands() != 0 ? getOperand(0) : 0;
   }
 
   unsigned getNumSuccessors() const { return 0; }