diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-01-19 18:45:35 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-01-19 18:45:35 +0000 |
commit | de03a8b38d88d278e39e6218ab2f0f7de6a3c161 (patch) | |
tree | 1e5857cdfe031c5770da02b20821b5f35806da3f /llvm/lib/IR/Metadata.cpp | |
parent | f13404536548c6de78369726250fd252f534808b (diff) | |
download | bcm5719-llvm-de03a8b38d88d278e39e6218ab2f0f7de6a3c161.tar.gz bcm5719-llvm-de03a8b38d88d278e39e6218ab2f0f7de6a3c161.zip |
IR: Add isUniqued() and isTemporary()
Change `MDNode::isDistinct()` to only apply to 'distinct' nodes (not
temporaries), and introduce `MDNode::isUniqued()` and
`MDNode::isTemporary()` for the other two possibilities.
llvm-svn: 226482
Diffstat (limited to 'llvm/lib/IR/Metadata.cpp')
-rw-r--r-- | llvm/lib/IR/Metadata.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/Metadata.cpp b/llvm/lib/IR/Metadata.cpp index 714b17e974e..93778c2ca54 100644 --- a/llvm/lib/IR/Metadata.cpp +++ b/llvm/lib/IR/Metadata.cpp @@ -750,7 +750,7 @@ void MDNode::replaceOperandWith(unsigned I, Metadata *New) { if (getOperand(I) == New) return; - if (isDistinct()) { + if (!isUniqued()) { setOperand(I, New); return; } |