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;