OSDN Git Service

IR: Add MDNode::isDistinct()
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 7 Jan 2015 21:35:38 +0000 (21:35 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 7 Jan 2015 21:35:38 +0000 (21:35 +0000)
commitee06e126b75206c62da7c36ddc5411ec26358a9a
tree3907955cf939280d189c2646cdcfd283439c0048
parent699e5d7bc988e123643407fcc88db690380fb675
IR: Add MDNode::isDistinct()

Add API to indicate whether an `MDNode` is distinct.  A distinct node is
not stored in the MDNode uniquing tables, and will never be returned by
`MDNode::get()`.

Although distinct nodes are only currently created by uniquing
collisions (when operands change), PR22111 will allow these nodes to be
explicitly created.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225401 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/Metadata.h
unittests/IR/MetadataTest.cpp