aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-03-07 20:08:07 +0000
committerDevang Patel <dpatel@apple.com>2008-03-07 20:08:07 +0000
commit22a8a734e941762ae67c3bb7cfa385bf02395ba9 (patch)
treed7d2ff5f8caab8db340dbd3b9d66d8e74ae27953 /include
parent6a021a4ddab1ef7eae07065861e833f3ca3c0ad7 (diff)
downloadexternal_llvm-22a8a734e941762ae67c3bb7cfa385bf02395ba9.zip
external_llvm-22a8a734e941762ae67c3bb7cfa385bf02395ba9.tar.gz
external_llvm-22a8a734e941762ae67c3bb7cfa385bf02395ba9.tar.bz2
RetVal is not used when there are more then one return operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48022 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Instructions.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index 3dd4279..82b1381 100644
--- a/include/llvm/Instructions.h
+++ b/include/llvm/Instructions.h
@@ -1421,9 +1421,10 @@ public:
virtual ReturnInst *clone() const;
Value *getReturnValue(unsigned n = 0) const {
- if (n == 0)
+ if (getNumOperands() > 1)
+ return getOperand(n);
+ else
return RetVal;
- return getOperand(n);
}
unsigned getNumSuccessors() const { return 0; }