aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Instructions.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Instructions.h')
-rw-r--r--include/llvm/Instructions.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index a17fb9fc19..a7be756c0b 100644
--- a/include/llvm/Instructions.h
+++ b/include/llvm/Instructions.h
@@ -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; }