summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Metadata.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-19 18:45:35 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-01-19 18:45:35 +0000
commitde03a8b38d88d278e39e6218ab2f0f7de6a3c161 (patch)
tree1e5857cdfe031c5770da02b20821b5f35806da3f /llvm/lib/IR/Metadata.cpp
parentf13404536548c6de78369726250fd252f534808b (diff)
downloadbcm5719-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.cpp2
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;
}
OpenPOWER on IntegriCloud