From: Chris Lattner Date: Fri, 5 Aug 2005 16:55:31 +0000 (+0000) Subject: Fix a use-of-dangling-pointer bug, from the introduction of SrcValue's. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=c534395cb22202e66f27abe99dd9c153b4a68b14;p=oota-llvm.git Fix a use-of-dangling-pointer bug, from the introduction of SrcValue's. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22679 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index e45e708ede6..6a018a546c1 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -215,6 +215,11 @@ void SelectionDAG::DeleteNodeIfDead(SDNode *N, void *NodeSet) { case ISD::VALUETYPE: ValueTypeNodes[cast(N)->getVT()] = 0; break; + case ISD::SRCVALUE: { + SrcValueSDNode *SVN = cast(N); + ValueNodes.erase(std::make_pair(SVN->getValue(), SVN->getOffset())); + break; + } case ISD::LOAD: Loads.erase(std::make_pair(N->getOperand(1), std::make_pair(N->getOperand(0),