Assert to bounds check MDNode::getOperand.
authorDavid Blaikie <dblaikie@gmail.com>
Fri, 8 Mar 2013 21:08:23 +0000 (21:08 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Fri, 8 Mar 2013 21:08:23 +0000 (21:08 +0000)
commit5846239e1669f8047ad095f18d05e4a04bd61079
treedbaea486ac8b000547343821e609407ffe304da5
parentd974524d3da2cb17dda908e7a78d3542e4c67ef6
Assert to bounds check MDNode::getOperand.

The getOperandPtr utility already bounds checks, but allows one-off-the-end.
This assert should catch the cases that could previously have been dereferencing
these one-off-the-end pointer. Happily, no cases of this came up with this
change.

llvm-svn: 176721
llvm/lib/IR/Metadata.cpp