From: Duncan P. N. Exon Smith Date: Mon, 19 Jan 2015 19:28:28 +0000 (+0000) Subject: IR: Simplify handleChangedOperand() fast path, NFC X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e2644b68c16711e93cd2ae939ce7f8d11912df85;p=oota-llvm.git IR: Simplify handleChangedOperand() fast path, NFC Use `isUniqued()` instead of `isStoredDistinctInContext()`, and remove an assertion that won't be valid once temporaries are merged back in. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226491 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/IR/Metadata.cpp b/lib/IR/Metadata.cpp index c3bcc8d3473..39d76c51d0d 100644 --- a/lib/IR/Metadata.cpp +++ b/lib/IR/Metadata.cpp @@ -524,9 +524,7 @@ void UniquableMDNode::handleChangedOperand(void *Ref, Metadata *New) { unsigned Op = static_cast(Ref) - op_begin(); assert(Op < getNumOperands() && "Expected valid operand"); - if (isStoredDistinctInContext()) { - assert(isResolved() && "Expected distinct node to be resolved"); - + if (!isUniqued()) { // This node is not uniqued. Just set the operand and be done with it. setOperand(Op, New); return;