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

Chris Lattner lattner at cs.uiuc.edu
Mon Mar 1 13:04:03 PST 2004


Changes in directory llvm/lib/Analysis/DataStructure:

Local.cpp updated: 1.94 -> 1.95

---
Log message:

Correctly add an array marker on a node when appropriate!


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

Index: llvm/lib/Analysis/DataStructure/Local.cpp
diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.94 llvm/lib/Analysis/DataStructure/Local.cpp:1.95
--- llvm/lib/Analysis/DataStructure/Local.cpp:1.94	Fri Feb 27 14:04:48 2004
+++ llvm/lib/Analysis/DataStructure/Local.cpp	Mon Mar  1 13:02:54 2004
@@ -383,6 +383,10 @@
     if (const StructType *STy = dyn_cast<StructType>(*I)) {
       unsigned FieldNo = cast<ConstantUInt>(I.getOperand())->getValue();
       Offset += TD.getStructLayout(STy)->MemberOffsets[FieldNo];
+    } else if (const PointerType *PTy = dyn_cast<PointerType>(*I)) {
+      if (!isa<Constant>(I.getOperand()) ||
+          !cast<Constant>(I.getOperand())->isNullValue())
+        Value.getNode()->setArrayMarker();
     }
 
 





More information about the llvm-commits mailing list