aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-08-05 16:55:31 +0000
committerChris Lattner <sabre@nondot.org>2005-08-05 16:55:31 +0000
commitc534395cb22202e66f27abe99dd9c153b4a68b14 (patch)
tree42867d32f26174b5800f5acca6904df783bc1d30 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parent2f4eca30d11d634ac2a26eed4d80f8bc9584a4b3 (diff)
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
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index e45e708ede..6a018a546c 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<VTSDNode>(N)->getVT()] = 0;
break;
+ case ISD::SRCVALUE: {
+ SrcValueSDNode *SVN = cast<SrcValueSDNode>(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),