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

Chris Lattner lattner at cs.uiuc.edu
Tue Apr 26 13:03:49 PDT 2005



Changes in directory llvm/lib/VMCore:

Type.cpp updated: 1.126 -> 1.127
---
Log message:

don't let Reid build void*'s :)


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

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


Index: llvm/lib/VMCore/Type.cpp
diff -u llvm/lib/VMCore/Type.cpp:1.126 llvm/lib/VMCore/Type.cpp:1.127
--- llvm/lib/VMCore/Type.cpp:1.126	Sat Apr 23 17:01:39 2005
+++ llvm/lib/VMCore/Type.cpp	Tue Apr 26 15:03:33 2005
@@ -1110,6 +1110,8 @@
 
 PointerType *PointerType::get(const Type *ValueType) {
   assert(ValueType && "Can't get a pointer to <null> type!");
+  assert(ValueType != Type::VoidTy &&
+         "Pointer to void is not valid, use sbyte* instead!");
   PointerValType PVT(ValueType);
 
   PointerType *PT = PointerTypes.get(PVT);






More information about the llvm-commits mailing list