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

llvm-svn: 15543
This commit is contained in:
Alkis Evlogimenos 2004-08-06 14:33:37 +00:00
parent 5064097632
commit 079fbde482
1 changed files with 3 additions and 3 deletions

View File

@ -416,9 +416,9 @@ StoreInst::StoreInst(Value *Val, Value *Ptr, bool isVolatile,
}
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));