summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineCodeForInstruction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/MachineCodeForInstruction.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineCodeForInstruction.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineCodeForInstruction.cpp b/llvm/lib/CodeGen/MachineCodeForInstruction.cpp
index 50a54099c5c..9d63df5bf85 100644
--- a/llvm/lib/CodeGen/MachineCodeForInstruction.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud