summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/AsmParser')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp66
-rw-r--r--llvm/lib/AsmParser/LLParser.h6
2 files changed, 65 insertions, 7 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 6bf3d803a21..99be044d865 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -3083,13 +3083,11 @@ bool LLParser::ParseMDField(StringRef Name, FieldTy &Result) {
bool LLParser::ParseSpecializedMDNode(MDNode *&N, bool IsDistinct) {
assert(Lex.getKind() == lltok::MetadataVar && "Expected metadata type name");
-#define DISPATCH_TO_PARSER(CLASS) \
+
+#define HANDLE_SPECIALIZED_MDNODE_LEAF(CLASS) \
if (Lex.getStrVal() == #CLASS) \
return Parse##CLASS(N, IsDistinct);
-
- DISPATCH_TO_PARSER(MDLocation);
- DISPATCH_TO_PARSER(GenericDebugNode);
-#undef DISPATCH_TO_PARSER
+#include "llvm/IR/Metadata.def"
return TokError("expected metadata type");
}
@@ -3146,6 +3144,64 @@ bool LLParser::ParseGenericDebugNode(MDNode *&Result, bool IsDistinct) {
(Context, tag.Val, header.Val, operands.Val));
return false;
}
+
+bool LLParser::ParseMDSubrange(MDNode *&Result, bool IsDistinct) {
+ return TokError("unimplemented parser");
+}
+bool LLParser::ParseMDEnumerator(MDNode *&Result, bool IsDistinct) {
+ return TokError("unimplemented parser");
+}
+bool LLParser::ParseMDBasicType(MDNode *&Result, bool IsDistinct) {
+ return TokError("unimplemented parser");
+}
+bool LLParser::ParseMDDerivedType(MDNode *&Result, bool IsDistinct) {
+ return TokError("unimplemented parser");
+}
+bool LLParser::ParseMDCompositeType(MDNode *&Result, bool IsDistinct) {
+ return TokError("unimplemented parser");
+}
+bool LLParser::ParseMDSubroutineType(MDNode *&Result, bool IsDistinct) {
+ return TokError("unimplemented parser");
+}
+bool LLParser::ParseMDFile(MDNode *&Result, bool IsDistinct) {
+ return TokError("unimplemented parser");
+}
+bool LLParser::ParseMDCompileUnit(MDNode *&Result, bool IsDistinct) {
+ return TokError("unimplemented parser");
+}
+bool LLParser::ParseMDSubprogram(MDNode *&Result, bool IsDistinct) {
+ return TokError("unimplemented parser");
+}
+bool LLParser::ParseMDLexicalBlock(MDNode *&Result, bool IsDistinct) {
+ return TokError("unimplemented parser");
+}
+bool LLParser::ParseMDLexicalBlockFile(MDNode *&Result, bool IsDistinct) {
+ return TokError("unimplemented parser");
+}
+bool LLParser::ParseMDNamespace(MDNode *&Result, bool IsDistinct) {
+ return TokError("unimplemented parser");
+}
+bool LLParser::ParseMDTemplateTypeParameter(MDNode *&Result, bool IsDistinct) {
+ return TokError("unimplemented parser");
+}
+bool LLParser::ParseMDTemplateValueParameter(MDNode *&Result, bool IsDistinct) {
+ return TokError("unimplemented parser");
+}
+bool LLParser::ParseMDGlobalVariable(MDNode *&Result, bool IsDistinct) {
+ return TokError("unimplemented parser");
+}
+bool LLParser::ParseMDLocalVariable(MDNode *&Result, bool IsDistinct) {
+ return TokError("unimplemented parser");
+}
+bool LLParser::ParseMDExpression(MDNode *&Result, bool IsDistinct) {
+ return TokError("unimplemented parser");
+}
+bool LLParser::ParseMDObjCProperty(MDNode *&Result, bool IsDistinct) {
+ return TokError("unimplemented parser");
+}
+bool LLParser::ParseMDImportedEntity(MDNode *&Result, bool IsDistinct) {
+ return TokError("unimplemented parser");
+}
#undef PARSE_MD_FIELD
#undef NOP_FIELD
#undef REQUIRE_FIELD
diff --git a/llvm/lib/AsmParser/LLParser.h b/llvm/lib/AsmParser/LLParser.h
index 12506e53684..a45e446cce8 100644
--- a/llvm/lib/AsmParser/LLParser.h
+++ b/llvm/lib/AsmParser/LLParser.h
@@ -401,8 +401,10 @@ namespace llvm {
template <class ParserTy>
bool ParseMDFieldsImpl(ParserTy parseField, LocTy &ClosingLoc);
bool ParseSpecializedMDNode(MDNode *&N, bool IsDistinct = false);
- bool ParseMDLocation(MDNode *&Result, bool IsDistinct);
- bool ParseGenericDebugNode(MDNode *&Result, bool IsDistinct);
+
+#define HANDLE_SPECIALIZED_MDNODE_LEAF(CLASS) \
+ bool Parse##CLASS(MDNode *&Result, bool IsDistinct);
+#include "llvm/IR/Metadata.def"
// Function Parsing.
struct ArgInfo {
OpenPOWER on IntegriCloud