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