summaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Metadata.cpp
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2010-07-15 17:06:11 +0000
committerrdivacky <rdivacky@FreeBSD.org>2010-07-15 17:06:11 +0000
commitc1c3262b63b1d5fbba6a7ad188f4e47d92c7840e (patch)
tree5b6d391c72c9875f0065f0e772e872bc8544834b /lib/VMCore/Metadata.cpp
parent9112829d76cbb8e0c8ef51bbc2d7d1be48cd7b74 (diff)
downloadFreeBSD-src-c1c3262b63b1d5fbba6a7ad188f4e47d92c7840e.zip
FreeBSD-src-c1c3262b63b1d5fbba6a7ad188f4e47d92c7840e.tar.gz
Update LLVM to r108428.
Diffstat (limited to 'lib/VMCore/Metadata.cpp')
-rw-r--r--lib/VMCore/Metadata.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VMCore/Metadata.cpp b/lib/VMCore/Metadata.cpp
index 1d3a058..3100d4a 100644
--- a/lib/VMCore/Metadata.cpp
+++ b/lib/VMCore/Metadata.cpp
@@ -78,7 +78,8 @@ void MDNodeOperand::allUsesReplacedWith(Value *NV) {
/// getOperandPtr - Helper function to get the MDNodeOperand's coallocated on
/// the end of the MDNode.
static MDNodeOperand *getOperandPtr(MDNode *N, unsigned Op) {
- assert(Op < N->getNumOperands() && "Invalid operand number");
+ // Use <= instead of < to permit a one-past-the-end address.
+ assert(Op <= N->getNumOperands() && "Invalid operand number");
return reinterpret_cast<MDNodeOperand*>(N+1)+Op;
}
OpenPOWER on IntegriCloud