aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineCodeForInstruction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/MachineCodeForInstruction.cpp')
-rw-r--r--lib/CodeGen/MachineCodeForInstruction.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/CodeGen/MachineCodeForInstruction.cpp b/lib/CodeGen/MachineCodeForInstruction.cpp
index 50a54099c5..9d63df5bf8 100644
--- a/lib/CodeGen/MachineCodeForInstruction.cpp
+++ b/lib/CodeGen/MachineCodeForInstruction.cpp
@@ -60,9 +60,8 @@ MachineCodeForInstruction::~MachineCodeForInstruction() {
for (unsigned i=0, N=tempVec.size(); i < N; i++)
delete tempVec[i];
- // Free the MachineInstr objects allocated, if any.
- for (unsigned i=0, N = size(); i < N; i++)
- delete (*this)[i];
+ // do not free the MachineInstr objects allocated. they are managed
+ // by the ilist in MachineBasicBlock
// Free the CallArgsDescriptor if it exists.
delete callArgsDesc;