From: Anton Korobeynikov Date: Wed, 27 Feb 2008 22:37:28 +0000 (+0000) Subject: Assert on invalid PHINode::addIncoming() arguments. Patch by Erick Tryzelaar! X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=351b0d4e4ef2427beabc07a10a43977060056c74;p=oota-llvm.git 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 --- diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index 59c2762d199..3474429f762 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;