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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226482 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2015-01-19 18:45:35 +00:00
parent 5f50874b3d
commit 1d72e18caa
4 changed files with 32 additions and 12 deletions

View File

@ -750,7 +750,7 @@ void MDNode::replaceOperandWith(unsigned I, Metadata *New) {
if (getOperand(I) == New)
return;
if (isDistinct()) {
if (!isUniqued()) {
setOperand(I, New);
return;
}