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

Reid Spencer reid at x10sys.com
Sat Feb 10 14:03:01 PST 2007



Changes in directory llvm/lib/VMCore:

Type.cpp updated: 1.170 -> 1.171
---
Log message:

Assert that elements of packed are pointer/float/opaque.


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

 Type.cpp |    4 ++++
 1 files changed, 4 insertions(+)


Index: llvm/lib/VMCore/Type.cpp
diff -u llvm/lib/VMCore/Type.cpp:1.170 llvm/lib/VMCore/Type.cpp:1.171
--- llvm/lib/VMCore/Type.cpp:1.170	Sat Feb 10 13:03:01 2007
+++ llvm/lib/VMCore/Type.cpp	Sat Feb 10 16:02:45 2007
@@ -426,6 +426,10 @@
   NumElements = NumEl;
   setAbstract(ElType->isAbstract());
   assert(NumEl > 0 && "NumEl of a PackedType must be greater than 0");
+  assert((ElType->isInteger() || ElType->isFloatingPoint() || 
+          isa<OpaqueType>(ElType)) && 
+         "Elements of a PackedType must be a primitive type");
+
 }
 
 






More information about the llvm-commits mailing list