mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-08 23:55:03 +00:00
26 lines
604 B
C++
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;
|
||
|
}
|