+/// ParseDIMacro:
+/// ::= !DIMacro(macinfo: type, line: 9, name: "SomeMacro", value: "SomeValue")
+bool LLParser::ParseDIMacro(MDNode *&Result, bool IsDistinct) {
+#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED) \
+ REQUIRED(type, DwarfMacinfoTypeField, ); \
+ REQUIRED(line, LineField, ); \
+ REQUIRED(name, MDStringField, ); \
+ OPTIONAL(value, MDStringField, );
+ PARSE_MD_FIELDS();
+#undef VISIT_MD_FIELDS
+
+ Result = GET_OR_DISTINCT(DIMacro,
+ (Context, type.Val, line.Val, name.Val, value.Val));
+ return false;
+}
+
+/// ParseDIMacroFile:
+/// ::= !DIMacroFile(line: 9, file: !2, nodes: !3)
+bool LLParser::ParseDIMacroFile(MDNode *&Result, bool IsDistinct) {
+#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED) \
+ OPTIONAL(type, DwarfMacinfoTypeField, (dwarf::DW_MACINFO_start_file)); \
+ REQUIRED(line, LineField, ); \
+ REQUIRED(file, MDField, ); \
+ OPTIONAL(nodes, MDField, );
+ PARSE_MD_FIELDS();
+#undef VISIT_MD_FIELDS
+
+ Result = GET_OR_DISTINCT(DIMacroFile,
+ (Context, type.Val, line.Val, file.Val, nodes.Val));
+ return false;
+}
+
+