]> granicus.if.org Git - llvm/commitdiff
LangRef: Add usage points for distinct MDNodes
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 8 Jan 2015 23:50:26 +0000 (23:50 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 8 Jan 2015 23:50:26 +0000 (23:50 +0000)
Omission pointed out by Sean Silva!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225479 91177308-0d34-0410-b5e6-96231b3b80d8

docs/LangRef.rst

index 0a1c7768d5a9dc76cd9302d0c037b6598a298b35..b3f97de25b4307e81981bab578055db0b3b5e393 100644 (file)
@@ -2854,6 +2854,10 @@ Metadata nodes that aren't uniqued use the ``distinct`` keyword. For example:
 
     !0 = distinct !{!"test\00", i32 10}
 
+``distinct`` nodes are useful when nodes shouldn't be merged based on their
+content.  They can also occur when transformations cause uniquing collisions
+when metadata operands change.
+
 A :ref:`named metadata <namedmetadatastructure>` is a collection of
 metadata nodes, which can be looked up in the module symbol table. For
 example: