diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/VMCore/InstrTypes.cpp | 2 |
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)); } |

