llvm-6502/lib/VMCore/iReturn.cpp
Chris Lattner 009505452b Initial revision
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-06 20:29:01 +00:00

26 lines
604 B
C++

//===-- 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;
}