add method

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31066 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-10-20 18:00:03 +00:00
parent 7fbe9723e3
commit 986cc38613

View File

@ -70,9 +70,18 @@ public:
MachineOperand(const MachineOperand &M) {
*this = M;
}
~MachineOperand() {}
static MachineOperand CreateImm(int64_t Val) {
MachineOperand Op;
Op.opType = MachineOperand::MO_Immediate;
Op.contents.immedVal = Val;
Op.IsDef = false;
Op.offset = 0;
return Op;
}
const MachineOperand &operator=(const MachineOperand &MO) {
contents = MO.contents;
IsDef = MO.IsDef;