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:29:28 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-13 01:29:28 +0000
commita96d40999702c46894b6aad419e573a4bbc90673 (patch)
treebf34989a887523bad13fa9f986b07d72d8c21b7c /llvm/lib/AsmParser/LLParser.cpp
parent890533e987c8ba71e09ea3cac19061d520dbbf23 (diff)
downloadbcm5719-llvm-a96d40999702c46894b6aad419e573a4bbc90673.tar.gz
bcm5719-llvm-a96d40999702c46894b6aad419e573a4bbc90673.zip
AsmWriter/Bitcode: MDLexicalBlock
llvm-svn: 229016
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.cpp')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 445c7a405f7..e579b431d26 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -3466,9 +3466,22 @@ bool LLParser::ParseMDSubprogram(MDNode *&Result, bool IsDistinct) {
return false;
}
+/// ParseMDLexicalBlock:
+/// ::= !MDLexicalBlock(scope: !0, file: !2, line: 7, column: 9)
bool LLParser::ParseMDLexicalBlock(MDNode *&Result, bool IsDistinct) {
- return TokError("unimplemented parser");
+#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED) \
+ REQUIRED(scope, MDField, ); \
+ OPTIONAL(file, MDField, ); \
+ OPTIONAL(line, LineField, ); \
+ OPTIONAL(column, ColumnField, );
+ PARSE_MD_FIELDS();
+#undef VISIT_MD_FIELDS
+
+ Result = GET_OR_DISTINCT(
+ MDLexicalBlock, (Context, scope.Val, file.Val, line.Val, column.Val));
+ return false;
}
+
bool LLParser::ParseMDLexicalBlockFile(MDNode *&Result, bool IsDistinct) {
return TokError("unimplemented parser");
}
OpenPOWER on IntegriCloud