diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2008-02-27 22:37:28 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2008-02-27 22:37:28 +0000 |
commit | 351b0d4e4ef2427beabc07a10a43977060056c74 (patch) | |
tree | 9d3875d86d9ecb52d71b7fdc151f2833e926df91 | |
parent | 8155d64c2ffab8b17e0fd8e3b7a66fcef6a8ec9d (diff) |
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
-rw-r--r-- | include/llvm/Instructions.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index 59c2762d19..3474429f76 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -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; |