diff options
Diffstat (limited to 'lib/VMCore/iReturn.cpp')
-rw-r--r-- | lib/VMCore/iReturn.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/VMCore/iReturn.cpp b/lib/VMCore/iReturn.cpp new file mode 100644 index 0000000000..7fa04fb42c --- /dev/null +++ b/lib/VMCore/iReturn.cpp @@ -0,0 +1,25 @@ +//===-- iReturn.cpp - Implement the Return instruction -----------*- C++ -*--=// +// +// This file implements the Return instruction... +// +//===----------------------------------------------------------------------===// + +#include "llvm/iTerminators.h" + +ReturnInst::ReturnInst(Value *V) + : TerminatorInst(Instruction::Ret), Val(V, this) { +} + +ReturnInst::ReturnInst(const ReturnInst &RI) + : TerminatorInst(Instruction::Ret), Val(RI.Val, this) { +} + +void ReturnInst::dropAllReferences() { + Val = 0; +} + +bool ReturnInst::setOperand(unsigned i, Value *V) { + if (i) return false; + Val = V; + return true; +} |