summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/DataStructure/Local.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-02-24 19:55:31 +0000
committerChris Lattner <sabre@nondot.org>2005-02-24 19:55:31 +0000
commit468fd33abb7c7f6c35d7fbea39aebbd2c7f6ac88 (patch)
tree89a9badc4ea8020ca0814ae73aaddfae1b7e5160 /llvm/lib/Analysis/DataStructure/Local.cpp
parenteeedeaff99db180c3fd39e9a8002d947ae0819fa (diff)
downloadbcm5719-llvm-468fd33abb7c7f6c35d7fbea39aebbd2c7f6ac88.tar.gz
bcm5719-llvm-468fd33abb7c7f6c35d7fbea39aebbd2c7f6ac88.zip
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
Diffstat (limited to 'llvm/lib/Analysis/DataStructure/Local.cpp')
-rw-r--r--llvm/lib/Analysis/DataStructure/Local.cpp3
1 files changed, 2 insertions, 1 deletions
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).
OpenPOWER on IntegriCloud