summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.cpp')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 360e8a49c8f..fc829166abf 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -3658,9 +3658,24 @@ bool LLParser::ParseMDObjCProperty(MDNode *&Result, bool IsDistinct) {
return false;
}
+/// ParseMDImportedEntity:
+/// ::= !MDImportedEntity(tag: DW_TAG_imported_module, scope: !0, entity: !1,
+/// line: 7, name: "foo")
bool LLParser::ParseMDImportedEntity(MDNode *&Result, bool IsDistinct) {
- return TokError("unimplemented parser");
+#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED) \
+ REQUIRED(tag, DwarfTagField, ); \
+ REQUIRED(scope, MDField, ); \
+ OPTIONAL(entity, MDField, ); \
+ OPTIONAL(line, LineField, ); \
+ OPTIONAL(name, MDStringField, );
+ PARSE_MD_FIELDS();
+#undef VISIT_MD_FIELDS
+
+ Result = GET_OR_DISTINCT(MDImportedEntity, (Context, tag.Val, scope.Val,
+ entity.Val, line.Val, name.Val));
+ return false;
}
+
#undef PARSE_MD_FIELD
#undef NOP_FIELD
#undef REQUIRE_FIELD
OpenPOWER on IntegriCloud