aboutsummaryrefslogtreecommitdiff
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
commitbbe7bbe4d97230f9e2a3da1fc8297b5a53bcdd29 (patch)
treeef0700e16675a596ed12697fe84a78658f04c615
parent5f4a5289d406ea0b40994544d613df689ccfb2e1 (diff)
Add an assertion that would hopefully catch a problem that was tripping
cameron up git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1944 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/VMCore/InstrTypes.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/VMCore/InstrTypes.cpp b/lib/VMCore/InstrTypes.cpp
index a4c8212632..3ed9e688ee 100644
--- a/lib/VMCore/InstrTypes.cpp
+++ b/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));
}