Assert on invalid PHINode::addIncoming() arguments. Patch by Erick Tryzelaar!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47697 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anton Korobeynikov 2008-02-27 22:37:28 +00:00
parent 8155d64c2f
commit 351b0d4e4e

View File

@ -1312,6 +1312,8 @@ public:
/// addIncoming - Add an incoming value to the end of the PHI list
///
void addIncoming(Value *V, BasicBlock *BB) {
assert(V && "PHI node got a null value!");
assert(BB && "PHI node got a null basic block!");
assert(getType() == V->getType() &&
"All operands to PHI node must be the same type as the PHI node!");
unsigned OpNo = NumOperands;