Move asserts from PHINode::addIncoming to PHINode::setIncoming*
authorHal Finkel <hfinkel@anl.gov>
Sat, 12 Sep 2015 00:08:21 +0000 (00:08 +0000)
committerHal Finkel <hfinkel@anl.gov>
Sat, 12 Sep 2015 00:08:21 +0000 (00:08 +0000)
commit6adacc92331b88674f7a49ad8857dbb7109a8b81
treedf6c9a27dba32cd75ee814ed418fb4299876658e
parent0a0a960468ba6a903356bf78fe8b51d7a0817691
Move asserts from PHINode::addIncoming to PHINode::setIncoming*

We had asserts in PHINode::addIncoming to check that the value types matched
the type of the PHI, and that the associated BB was not null. These did not
catch, however, later uses of setIncomingValue and setIncomingBlock (which are
called by addIncoming as well). Moving the asserts to PHINode::setIncoming*
provides better coverage. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247492 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/Instructions.h