mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
IR: Simplify MDNode::setOperand(), NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226492 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e2644b68c1
commit
e85df9e0a2
@ -758,11 +758,7 @@ void MDNode::replaceOperandWith(unsigned I, Metadata *New) {
|
||||
|
||||
void MDNode::setOperand(unsigned I, Metadata *New) {
|
||||
assert(I < NumOperands);
|
||||
if (isStoredDistinctInContext() || isa<MDNodeFwdDecl>(this))
|
||||
// No need for a callback, this isn't uniqued.
|
||||
mutable_begin()[I].reset(New, nullptr);
|
||||
else
|
||||
mutable_begin()[I].reset(New, this);
|
||||
mutable_begin()[I].reset(New, isUniqued() ? this : nullptr);
|
||||
}
|
||||
|
||||
/// \brief Get a node, or a self-reference that looks like it.
|
||||
|
Loading…
Reference in New Issue
Block a user