Don't check for null on delete
authorChris Lattner <sabre@nondot.org>
Tue, 18 Sep 2001 17:02:42 +0000 (17:02 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 18 Sep 2001 17:02:42 +0000 (17:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@624 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/InstrSelection/InstrForest.cpp
lib/Target/SparcV9/InstrSelection/InstrForest.cpp

index efea63c3f1ac8221c3605cac451af76c574a3108..f7091a29c61bb4a12f0c0c96ebafca5b9fb8bf53 100644 (file)
@@ -182,11 +182,7 @@ InstrForest::~InstrForest()
 {
   for (hash_map<const Instruction*, InstructionNode*>:: iterator I = begin();
        I != end(); ++I)
-    {
-      InstructionNode* node = (*I).second;
-      if (node)
-       delete node;
-    }
+      delete (*I).second;
 }
 
 void
index efea63c3f1ac8221c3605cac451af76c574a3108..f7091a29c61bb4a12f0c0c96ebafca5b9fb8bf53 100644 (file)
@@ -182,11 +182,7 @@ InstrForest::~InstrForest()
 {
   for (hash_map<const Instruction*, InstructionNode*>:: iterator I = begin();
        I != end(); ++I)
-    {
-      InstructionNode* node = (*I).second;
-      if (node)
-       delete node;
-    }
+      delete (*I).second;
 }
 
 void