IR: Make temporary nodes distinct

Change the return of `MDNode::isDistinct()` for `MDNode::getTemporary()`
to `true`.  They aren't uniqued.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225646 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2015-01-12 18:41:26 +00:00
parent 5512415ade
commit 28184c10c9
2 changed files with 9 additions and 1 deletions

View File

@@ -651,7 +651,9 @@ public:
///
/// Distinct nodes are not uniqued, and will not be returned by \a
/// MDNode::get().
bool isDistinct() const { return IsDistinctInContext; }
bool isDistinct() const {
return isStoredDistinctInContext() || isa<MDNodeFwdDecl>(this);
}
protected:
/// \brief Set an operand.