summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-05-23 21:14:09 +0000
committerChris Lattner <sabre@nondot.org>2004-05-23 21:14:09 +0000
commit2412a05b80f2bfedc02410784451ca24f0756553 (patch)
treeded950a8950e344134bb095ef7066915da10a555 /lib
parent1bf3408f96a9e7901247f1731ab79f4dae1ce778 (diff)
downloadexternal_llvm-2412a05b80f2bfedc02410784451ca24f0756553.zip
external_llvm-2412a05b80f2bfedc02410784451ca24f0756553.tar.gz
external_llvm-2412a05b80f2bfedc02410784451ca24f0756553.tar.bz2
Fix a really nasty bug with the -disable-ds-field-sensitivity option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13681 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Analysis/DataStructure/Local.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp
index c969cc6..995c115 100644
--- a/lib/Analysis/DataStructure/Local.cpp
+++ b/lib/Analysis/DataStructure/Local.cpp
@@ -130,6 +130,9 @@ namespace {
DSNode *createNode(const Type *Ty = 0) {
DSNode *N = new DSNode(Ty, &G); // Create the node
if (DisableFieldSensitivity) {
+ // Create node handle referring to the old node so that it is
+ // immediately removed from the graph when the node handle is destroyed.
+ DSNodeHandle OldNNH = N;
N->foldNodeCompletely();
if (DSNode *FN = N->getForwardNode())
N = FN;