mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
Fix a memory leak in LiveIntervalAnalysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53779 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -312,16 +312,14 @@ MachineInstr::MachineInstr(MachineBasicBlock *MBB,
|
||||
|
||||
/// MachineInstr ctor - Copies MachineInstr arg exactly
|
||||
///
|
||||
MachineInstr::MachineInstr(MachineFunction &MF, const MachineInstr &MI) {
|
||||
TID = &MI.getDesc();
|
||||
NumImplicitOps = MI.NumImplicitOps;
|
||||
MachineInstr::MachineInstr(MachineFunction &MF, const MachineInstr &MI)
|
||||
: TID(&MI.getDesc()), NumImplicitOps(0), Parent(0) {
|
||||
Operands.reserve(MI.getNumOperands());
|
||||
|
||||
// Add operands
|
||||
for (unsigned i = 0; i != MI.getNumOperands(); ++i) {
|
||||
Operands.push_back(MI.getOperand(i));
|
||||
Operands.back().ParentMI = this;
|
||||
}
|
||||
for (unsigned i = 0; i != MI.getNumOperands(); ++i)
|
||||
addOperand(MI.getOperand(i));
|
||||
NumImplicitOps = MI.NumImplicitOps;
|
||||
|
||||
// Add memory operands.
|
||||
for (alist<MachineMemOperand>::const_iterator i = MI.memoperands_begin(),
|
||||
|
||||
Reference in New Issue
Block a user