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

Alkis Evlogimenos alkis at cs.uiuc.edu
Fri Aug 6 07:33:47 PDT 2004



Changes in directory llvm/lib/VMCore:

Instructions.cpp updated: 1.1 -> 1.2
---
Log message:

Split assertion to two in order to give better assertion messages.


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

Index: llvm/lib/VMCore/Instructions.cpp
diff -u llvm/lib/VMCore/Instructions.cpp:1.1 llvm/lib/VMCore/Instructions.cpp:1.2
--- llvm/lib/VMCore/Instructions.cpp:1.1	Thu Jul 29 07:33:25 2004
+++ llvm/lib/VMCore/Instructions.cpp	Fri Aug  6 09:33:37 2004
@@ -416,9 +416,9 @@
 }
 
 void StoreInst::init(Value *Val, Value *Ptr) {
-  assert(isa<PointerType>(Ptr->getType()) &&
-         Val->getType() == cast<PointerType>(Ptr->getType())->getElementType()
-         && "Ptr must have pointer type.");
+  assert(isa<PointerType>(Ptr->getType()) && "Ptr must have pointer type!");
+  assert(Val->getType() == cast<PointerType>(Ptr->getType())->getElementType()
+         && "Ptr must be a pointer to Val type!");
 
   Operands.reserve(2);
   Operands.push_back(Use(Val, this));






More information about the llvm-commits mailing list