Don't call clear() on DbgInfo when it's going to be deleted anyway.
authorDan Gohman <gohman@apple.com>
Fri, 18 Jun 2010 15:36:18 +0000 (15:36 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 18 Jun 2010 15:36:18 +0000 (15:36 +0000)
Don't replace the old DbgInfo with a new one when clear() on the
old one is sufficient.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106283 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAG.cpp

index 75cb2c2d06a39c62bc77377b50ade2f59e514449..91df1ab7b4418e2112272306207b535c186f7ae9 100644 (file)
@@ -807,7 +807,6 @@ void SelectionDAG::init(MachineFunction &mf) {
 SelectionDAG::~SelectionDAG() {
   allnodes_clear();
   delete Ordering;
-  DbgInfo->clear();
   delete DbgInfo;
 }
 
@@ -837,8 +836,6 @@ void SelectionDAG::clear() {
   delete Ordering;
   Ordering = new SDNodeOrdering();
   DbgInfo->clear();
-  delete DbgInfo;
-  DbgInfo = new SDDbgInfo();
 }
 
 SDValue SelectionDAG::getSExtOrTrunc(SDValue Op, DebugLoc DL, EVT VT) {