diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-01-19 19:28:28 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-01-19 19:28:28 +0000 |
commit | 3d5805685b198eb2b20d5d085ea75f5e03ba7cfd (patch) | |
tree | f42b10cd483ec972a47ada3811395684207e7555 /llvm/lib/IR/Metadata.cpp | |
parent | b8f796031fbe4f99cb456c7180bf9f695dd01590 (diff) | |
download | bcm5719-llvm-3d5805685b198eb2b20d5d085ea75f5e03ba7cfd.tar.gz bcm5719-llvm-3d5805685b198eb2b20d5d085ea75f5e03ba7cfd.zip |
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.
llvm-svn: 226491
Diffstat (limited to 'llvm/lib/IR/Metadata.cpp')
-rw-r--r-- | llvm/lib/IR/Metadata.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/IR/Metadata.cpp b/llvm/lib/IR/Metadata.cpp index c3bcc8d3473..39d76c51d0d 100644 --- a/llvm/lib/IR/Metadata.cpp +++ b/llvm/lib/IR/Metadata.cpp @@ -524,9 +524,7 @@ void UniquableMDNode::handleChangedOperand(void *Ref, Metadata *New) { unsigned Op = static_cast<MDOperand *>(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; |