From 468fd33abb7c7f6c35d7fbea39aebbd2c7f6ac88 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 24 Feb 2005 19:55:31 +0000 Subject: This instruction: X = gep null, ... Used to not create a scalar map entry for X, which caused clients to barf. This is bad. llvm-svn: 20316 --- llvm/lib/Analysis/DataStructure/Local.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Analysis/DataStructure/Local.cpp') diff --git a/llvm/lib/Analysis/DataStructure/Local.cpp b/llvm/lib/Analysis/DataStructure/Local.cpp index 948bf3fc5da..642de036975 100644 --- a/llvm/lib/Analysis/DataStructure/Local.cpp +++ b/llvm/lib/Analysis/DataStructure/Local.cpp @@ -318,7 +318,8 @@ void GraphBuilder::visitPHINode(PHINode &PN) { void GraphBuilder::visitGetElementPtrInst(User &GEP) { DSNodeHandle Value = getValueDest(*GEP.getOperand(0)); - if (Value.isNull()) return; + if (Value.isNull()) + Value = createNode(); // As a special case, if all of the index operands of GEP are constant zeros, // handle this just like we handle casts (ie, don't do much). -- cgit v1.2.3