summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLParser.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-13 01:14:11 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-13 01:14:11 +0000
commit87754764199bf7547b5336b35e9a704143c177b7 (patch)
treeb40337d23c6b3e20d9d164dcc92f23b715622f30 /llvm/lib/AsmParser/LLParser.cpp
parentc7363f1147f8d06c34683480b0cb7e24a395a534 (diff)
downloadbcm5719-llvm-87754764199bf7547b5336b35e9a704143c177b7.tar.gz
bcm5719-llvm-87754764199bf7547b5336b35e9a704143c177b7.zip
AsmWriter/Bitcode: MDEnumerator
llvm-svn: 229004
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.cpp')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 735cf494cb2..191b6f99557 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -3181,9 +3181,19 @@ bool LLParser::ParseMDSubrange(MDNode *&Result, bool IsDistinct) {
return false;
}
+/// ParseMDEnumerator:
+/// ::= !MDEnumerator(value: 30, name: "SomeKind")
bool LLParser::ParseMDEnumerator(MDNode *&Result, bool IsDistinct) {
- return TokError("unimplemented parser");
+#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED) \
+ REQUIRED(value, MDSignedField, ); \
+ REQUIRED(name, MDStringField, );
+ PARSE_MD_FIELDS();
+#undef VISIT_MD_FIELDS
+
+ Result = GET_OR_DISTINCT(MDEnumerator, (Context, value.Val, name.Val));
+ return false;
}
+
bool LLParser::ParseMDBasicType(MDNode *&Result, bool IsDistinct) {
return TokError("unimplemented parser");
}
OpenPOWER on IntegriCloud