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:32:09 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-13 01:32:09 +0000
commite146000565c86e7cd70d746a64084f1ea3a7528e (patch)
tree2e1ffeb85e0cca419b5e63bb4ad3481e958cc9bf /llvm/lib/AsmParser/LLParser.cpp
parent06a0702e4033573be42105bc51bbfeff628a00da (diff)
downloadbcm5719-llvm-e146000565c86e7cd70d746a64084f1ea3a7528e.tar.gz
bcm5719-llvm-e146000565c86e7cd70d746a64084f1ea3a7528e.zip
AsmWriter/Bitcode: MDNamespace
llvm-svn: 229018
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 90a680818f9..be1db2233d2 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -3497,9 +3497,22 @@ bool LLParser::ParseMDLexicalBlockFile(MDNode *&Result, bool IsDistinct) {
return false;
}
+/// ParseMDNamespace:
+/// ::= !MDNamespace(scope: !0, file: !2, name: "SomeNamespace", line: 9)
bool LLParser::ParseMDNamespace(MDNode *&Result, bool IsDistinct) {
- return TokError("unimplemented parser");
+#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED) \
+ REQUIRED(scope, MDField, ); \
+ OPTIONAL(file, MDField, ); \
+ OPTIONAL(name, MDStringField, ); \
+ OPTIONAL(line, LineField, );
+ PARSE_MD_FIELDS();
+#undef VISIT_MD_FIELDS
+
+ Result = GET_OR_DISTINCT(MDNamespace,
+ (Context, scope.Val, file.Val, name.Val, line.Val));
+ return false;
}
+
bool LLParser::ParseMDTemplateTypeParameter(MDNode *&Result, bool IsDistinct) {
return TokError("unimplemented parser");
}
OpenPOWER on IntegriCloud