mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-19 08:35:45 +00:00
Fixed up my changes to add support for cloning Machine Instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13665 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -73,7 +73,8 @@ MachineInstr::MachineInstr(MachineBasicBlock *MBB, short opcode,
|
||||
MachineInstr::MachineInstr(const MachineInstr &MI) {
|
||||
Opcode = MI.getOpcode();
|
||||
numImplicitRefs = MI.getNumImplicitRefs();
|
||||
|
||||
operands.reserve(MI.getNumOperands());
|
||||
|
||||
//Add operands
|
||||
for(unsigned i=0; i < MI.getNumOperands(); ++i)
|
||||
operands.push_back(MachineOperand(MI.getOperand(i)));
|
||||
@@ -89,7 +90,7 @@ MachineInstr::~MachineInstr()
|
||||
///all ways except the following: The instruction has no parent The
|
||||
///instruction has no name
|
||||
MachineInstr* MachineInstr::clone() {
|
||||
MachineInstr* newInst = new MachineInstr(*this);
|
||||
return new MachineInstr(*this);
|
||||
}
|
||||
|
||||
/// OperandComplete - Return true if it's illegal to add a new operand
|
||||
|
||||
Reference in New Issue
Block a user