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:39:44 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-13 01:39:44 +0000
commit72fe2d0b7928257881bdaba31984ccfc127eed08 (patch)
treee7ef367631fb25e7bd964d8ed8cd7e4c6c199e88 /llvm/lib/AsmParser/LLParser.cpp
parent00dbc753dbf3dd716fc4a980e0cd63718dad5b7e (diff)
downloadbcm5719-llvm-72fe2d0b7928257881bdaba31984ccfc127eed08.tar.gz
bcm5719-llvm-72fe2d0b7928257881bdaba31984ccfc127eed08.zip
AsmWriter/Bitcode: MDLocalVariable
llvm-svn: 229022
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.cpp')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 9c557258a4a..48dbaeeb76a 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -3575,9 +3575,30 @@ bool LLParser::ParseMDGlobalVariable(MDNode *&Result, bool IsDistinct) {
return false;
}
+/// ParseMDLocalVariable:
+/// ::= !MDLocalVariable(tag: DW_TAG_arg_variable, scope: !0, name: "foo",
+/// file: !1, line: 7, type: !2, arg: 2, flags: 7,
+/// inlinedAt: !3)
bool LLParser::ParseMDLocalVariable(MDNode *&Result, bool IsDistinct) {
- return TokError("unimplemented parser");
+#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED) \
+ REQUIRED(tag, DwarfTagField, ); \
+ OPTIONAL(scope, MDField, ); \
+ OPTIONAL(name, MDStringField, ); \
+ OPTIONAL(file, MDField, ); \
+ OPTIONAL(line, LineField, ); \
+ OPTIONAL(type, MDField, ); \
+ OPTIONAL(arg, MDUnsignedField, (0, UINT8_MAX)); \
+ OPTIONAL(flags, MDUnsignedField, (0, UINT32_MAX)); \
+ OPTIONAL(inlinedAt, MDField, );
+ PARSE_MD_FIELDS();
+#undef VISIT_MD_FIELDS
+
+ Result = GET_OR_DISTINCT(
+ MDLocalVariable, (Context, tag.Val, scope.Val, name.Val, file.Val,
+ line.Val, type.Val, arg.Val, flags.Val, inlinedAt.Val));
+ return false;
}
+
bool LLParser::ParseMDExpression(MDNode *&Result, bool IsDistinct) {
return TokError("unimplemented parser");
}
OpenPOWER on IntegriCloud