summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-03-22 18:01:58 +0000
committerChris Lattner <sabre@nondot.org>2002-03-22 18:01:58 +0000
commit220ef17a9e954eb157e308f7f12dfcef73bfab16 (patch)
treee9d1ce28e0c9b488067f03f5e17d4dfba011700c
parentb39971dfa87c6b59bce773b6d82b228c50acb08d (diff)
downloadbcm5719-llvm-220ef17a9e954eb157e308f7f12dfcef73bfab16.tar.gz
bcm5719-llvm-220ef17a9e954eb157e308f7f12dfcef73bfab16.zip
Add an assertion that would hopefully catch a problem that was tripping
cameron up llvm-svn: 1944
-rw-r--r--llvm/lib/VMCore/InstrTypes.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/InstrTypes.cpp b/llvm/lib/VMCore/InstrTypes.cpp
index a4c82126323..3ed9e688eef 100644
--- a/llvm/lib/VMCore/InstrTypes.cpp
+++ b/llvm/lib/VMCore/InstrTypes.cpp
@@ -59,6 +59,8 @@ PHINode::PHINode(const PHINode &PN)
}
void PHINode::addIncoming(Value *D, BasicBlock *BB) {
+ assert(getType() == D->getType() &&
+ "All operands to PHI node must be the same type as the PHI node!");
Operands.push_back(Use(D, this));
Operands.push_back(Use(BB, this));
}
OpenPOWER on IntegriCloud