diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-13 01:14:58 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-13 01:14:58 +0000 |
commit | 09e03f38d664ed09b6add37050c2df6cf1116272 (patch) | |
tree | d039abc6012ba4fc9b945c6b1d995d024253a6b7 /llvm/lib/AsmParser/LLParser.cpp | |
parent | 87754764199bf7547b5336b35e9a704143c177b7 (diff) | |
download | bcm5719-llvm-09e03f38d664ed09b6add37050c2df6cf1116272.tar.gz bcm5719-llvm-09e03f38d664ed09b6add37050c2df6cf1116272.zip |
AsmWriter/Bitcode: MDBasicType
llvm-svn: 229005
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.cpp')
-rw-r--r-- | llvm/lib/AsmParser/LLParser.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index 191b6f99557..802421356ad 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/lib/AsmParser/LLParser.cpp @@ -3194,9 +3194,23 @@ bool LLParser::ParseMDEnumerator(MDNode *&Result, bool IsDistinct) { return false; } +/// ParseMDBasicType: +/// ::= !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32) bool LLParser::ParseMDBasicType(MDNode *&Result, bool IsDistinct) { - return TokError("unimplemented parser"); +#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED) \ + REQUIRED(tag, DwarfTagField, ); \ + OPTIONAL(name, MDStringField, ); \ + OPTIONAL(size, MDUnsignedField, (0, UINT32_MAX)); \ + OPTIONAL(align, MDUnsignedField, (0, UINT32_MAX)); \ + OPTIONAL(encoding, MDUnsignedField, (0, UINT32_MAX)); + PARSE_MD_FIELDS(); +#undef VISIT_MD_FIELDS + + Result = GET_OR_DISTINCT(MDBasicType, (Context, tag.Val, name.Val, size.Val, + align.Val, encoding.Val)); + return false; } + bool LLParser::ParseMDDerivedType(MDNode *&Result, bool IsDistinct) { return TokError("unimplemented parser"); } |