summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/AsmParser')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 33f395a1f5a..24442ef127b 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -3329,7 +3329,14 @@ bool LLParser::ParseMDCompositeType(MDNode *&Result, bool IsDistinct) {
}
bool LLParser::ParseMDSubroutineType(MDNode *&Result, bool IsDistinct) {
- return TokError("unimplemented parser");
+#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED) \
+ OPTIONAL(flags, MDUnsignedField, (0, UINT32_MAX)); \
+ REQUIRED(types, MDField, );
+ PARSE_MD_FIELDS();
+#undef VISIT_MD_FIELDS
+
+ Result = GET_OR_DISTINCT(MDSubroutineType, (Context, flags.Val, types.Val));
+ return false;
}
/// ParseMDFileType:
OpenPOWER on IntegriCloud