summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-03-11 17:35:03 +0000
committerDevang Patel <dpatel@apple.com>2008-03-11 17:35:03 +0000
commit5aafa6ee1fec3fe5c1121ad887bffee495341136 (patch)
treef33effa015a808c4761517588a3ef1e70e46d102 /llvm
parent5663fe6613774ba6e834e1cfcbaa912c6bc3f241 (diff)
downloadbcm5719-llvm-5aafa6ee1fec3fe5c1121ad887bffee495341136.tar.gz
bcm5719-llvm-5aafa6ee1fec3fe5c1121ad887bffee495341136.zip
Fix getOperand() for ReturnInst.
llvm-svn: 48229
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/Instructions.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/include/llvm/Instructions.h b/llvm/include/llvm/Instructions.h
index 82b138183a7..3aa8d6879c2 100644
--- a/llvm/include/llvm/Instructions.h
+++ b/llvm/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:
OpenPOWER on IntegriCloud