[llvm-commits] CVS: llvm/lib/VMCore/Type.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Dec 1 09:12:28 PST 2004



Changes in directory llvm/lib/VMCore:

Type.cpp updated: 1.119 -> 1.120
---
Log message:

Get GEP's working with packed types.  Contributed by Morten Ofstad!


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

Index: llvm/lib/VMCore/Type.cpp
diff -u llvm/lib/VMCore/Type.cpp:1.119 llvm/lib/VMCore/Type.cpp:1.120
--- llvm/lib/VMCore/Type.cpp:1.119	Fri Nov 19 10:39:44 2004
+++ llvm/lib/VMCore/Type.cpp	Wed Dec  1 11:12:16 2004
@@ -151,6 +151,9 @@
   if (const ArrayType *ATy = dyn_cast<ArrayType>(this))
     return ATy->getElementType()->isSized();
 
+  if (const PackedType *PTy = dyn_cast<PackedType>(this))
+    return PTy->getElementType()->isSized();
+
   if (!isa<StructType>(this)) return false;
 
   // Okay, our struct is sized if all of the elements are...






More information about the llvm-commits mailing list