[llvm-commits] [llvm] r47697 - /llvm/trunk/include/llvm/Instructions.h
Anton Korobeynikov
asl at math.spbu.ru
Wed Feb 27 14:37:28 PST 2008
Author: asl
Date: Wed Feb 27 16:37:28 2008
New Revision: 47697
URL: http://llvm.org/viewvc/llvm-project?rev=47697&view=rev
Log:
Assert on invalid PHINode::addIncoming() arguments. Patch by Erick Tryzelaar!
Modified:
llvm/trunk/include/llvm/Instructions.h
Modified: llvm/trunk/include/llvm/Instructions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Instructions.h?rev=47697&r1=47696&r2=47697&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Instructions.h (original)
+++ llvm/trunk/include/llvm/Instructions.h Wed Feb 27 16:37:28 2008
@@ -1312,6 +1312,8 @@
/// 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;
More information about the llvm-commits
mailing list