mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-31 09:25:42 +00:00
Add support for empty metadata nodes: !{}.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108259 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user