aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineInstr.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen/MachineInstr.h')
-rw-r--r--include/llvm/CodeGen/MachineInstr.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h
index dac1c47c96..b6c18610ad 100644
--- a/include/llvm/CodeGen/MachineInstr.h
+++ b/include/llvm/CodeGen/MachineInstr.h
@@ -172,6 +172,7 @@ public:
contents.SymbolName = new std::string(M.getSymbolName());
}
+
~MachineOperand() {
if (isExternalSymbol())
delete contents.SymbolName;
@@ -367,7 +368,9 @@ class MachineInstr {
// OperandComplete - Return true if it's illegal to add a new operand
bool OperandsComplete() const;
- MachineInstr(const MachineInstr &); // DO NOT IMPLEMENT
+ //Constructor used by clone() method
+ MachineInstr(const MachineInstr&);
+
void operator=(const MachineInstr&); // DO NOT IMPLEMENT
// Intrusive list support
@@ -395,6 +398,9 @@ public:
const MachineBasicBlock* getParent() const { return parent; }
MachineBasicBlock* getParent() { return parent; }
+ //void setParent(const MachineBasicBlock *MBB) { parent = MBB; }
+ void setParent(MachineBasicBlock *MBB) { parent = MBB; }
+
/// getOpcode - Returns the opcode of this MachineInstr.
///
const int getOpcode() const { return Opcode; }
@@ -455,6 +461,12 @@ public:
MachineOperand::MO_VirtualRegister, V);
}
+ //Clone Instruction
+ //Create a copy of 'this' instruction that is
+ //identical in all ways except the following: The instruction has no
+ //parent The instruction has no name
+ MachineInstr* clone();
+
//
// Debugging support
//