[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/Local.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Oct 6 12:29:26 PDT 2004



Changes in directory llvm/lib/Analysis/DataStructure:

Local.cpp updated: 1.112 -> 1.113
---
Log message:

Dont' let null nodes sneak past cast instructions


---
Diffs of the changes:  (+4 -1)

Index: llvm/lib/Analysis/DataStructure/Local.cpp
diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.112 llvm/lib/Analysis/DataStructure/Local.cpp:1.113
--- llvm/lib/Analysis/DataStructure/Local.cpp:1.112	Sun Sep 19 23:45:25 2004
+++ llvm/lib/Analysis/DataStructure/Local.cpp	Wed Oct  6 14:29:13 2004
@@ -950,8 +950,11 @@
 void GraphBuilder::visitCastInst(CastInst &CI) {
   if (isPointerType(CI.getType()))
     if (isPointerType(CI.getOperand(0)->getType())) {
+      DSNodeHandle Ptr = getValueDest(*CI.getOperand(0));
+      if (Ptr.getNode() == 0) return;
+
       // Cast one pointer to the other, just act like a copy instruction
-      setDestTo(CI, getValueDest(*CI.getOperand(0)));
+      setDestTo(CI, Ptr);
     } else {
       // Cast something (floating point, small integer) to a pointer.  We need
       // to track the fact that the node points to SOMETHING, just something we






More information about the llvm-commits mailing list