From 9857c1a6ae46e51c8685907a0fc08166c2a71d71 Mon Sep 17 00:00:00 2001 From: Chris Lattner <sabre@nondot.org> Date: Sun, 8 Feb 2004 01:05:37 +0000 Subject: [PATCH] Bugfix for ilist conversion. The ilist wants to make an 'end' node which has G == 0 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11174 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/DataStructure/DataStructure.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp index 9311b101519..57651d78e1e 100644 --- a/lib/Analysis/DataStructure/DataStructure.cpp +++ b/lib/Analysis/DataStructure/DataStructure.cpp @@ -74,7 +74,7 @@ DSNode::DSNode(const Type *T, DSGraph *G) : NumReferrers(0), Size(0), ParentGraph(G), Ty(Type::VoidTy), NodeType(0) { // Add the type entry if it is specified... if (T) mergeTypeInfo(T, 0); - G->addNode(this); + if (G) G->addNode(this); ++NumNodeAllocated; }