[PATCH] D104827: [DebugInfo] Enforce implicit constraints on `distinct` MDNodes

Tony Tye via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 23 18:50:35 PDT 2021


t-tye added inline comments.


================
Comment at: llvm/include/llvm/IR/Metadata.def:21
+//   storage without any restrictions.
+// * UNIQUED: refers to nodes which must use uniqued or temporary storage.
+// * DISTINCT: refers to nodes which must use distinct or temporary storage.
----------------
Seems uniqued nodes now are always rendered inline and the other nodes are always rendered using IDs.

May be worth explaining that here since it is now describing these different cases.


================
Comment at: llvm/include/llvm/IR/Metadata.def:71
 
-// Handler for leaf nodes under MDNode.
+// Handler for specialized and always-uniqued leaf nodes under MDNode.  Defers to
+// HANDLE_MDNODE_LEAF_UNIQUED if it's defined, otherwise to
----------------
Use single space for consistency with comment above. Same for following comment,


================
Comment at: llvm/lib/AsmParser/LLParser.cpp:752
+    // Parse uniqued MDNodes inline as a special case.
+#define HANDLE_MDNODE_LEAF_UNIQUED(CLASS)                                      \
+  if (Lex.getKind() == lltok::MetadataVar && Lex.getStrVal() == #CLASS) {      \
----------------
So are all UNIQUED nodes are now allowed to be inline?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104827/new/

https://reviews.llvm.org/D104827



More information about the llvm-commits mailing list