From 921b5e14715f241b5050dfbe063621ded1344893 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 18 Sep 2001 17:02:42 +0000 Subject: [PATCH] Don't check for null on delete git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@624 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/InstrSelection/InstrForest.cpp | 6 +----- lib/Target/SparcV9/InstrSelection/InstrForest.cpp | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/lib/CodeGen/InstrSelection/InstrForest.cpp b/lib/CodeGen/InstrSelection/InstrForest.cpp index efea63c3f1a..f7091a29c61 100644 --- a/lib/CodeGen/InstrSelection/InstrForest.cpp +++ b/lib/CodeGen/InstrSelection/InstrForest.cpp @@ -182,11 +182,7 @@ InstrForest::~InstrForest() { for (hash_map:: iterator I = begin(); I != end(); ++I) - { - InstructionNode* node = (*I).second; - if (node) - delete node; - } + delete (*I).second; } void diff --git a/lib/Target/SparcV9/InstrSelection/InstrForest.cpp b/lib/Target/SparcV9/InstrSelection/InstrForest.cpp index efea63c3f1a..f7091a29c61 100644 --- a/lib/Target/SparcV9/InstrSelection/InstrForest.cpp +++ b/lib/Target/SparcV9/InstrSelection/InstrForest.cpp @@ -182,11 +182,7 @@ InstrForest::~InstrForest() { for (hash_map:: iterator I = begin(); I != end(); ++I) - { - InstructionNode* node = (*I).second; - if (node) - delete node; - } + delete (*I).second; } void -- 2.34.1