AsmWriter/Bitcode: MDTemplate{Type,Value}Parameter

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229019 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2015-02-13 01:34:32 +00:00
parent 7bd3d1d3bd
commit 8921bbca59
13 changed files with 169 additions and 25 deletions

View File

@ -3513,12 +3513,41 @@ bool LLParser::ParseMDNamespace(MDNode *&Result, bool IsDistinct) {
return false;
}
/// ParseMDTemplateTypeParameter:
/// ::= !MDTemplateTypeParameter(scope: !0, name: "Ty", type: !1)
bool LLParser::ParseMDTemplateTypeParameter(MDNode *&Result, bool IsDistinct) {
return TokError("unimplemented parser");
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED) \
REQUIRED(scope, MDField, ); \
OPTIONAL(name, MDStringField, ); \
REQUIRED(type, MDField, );
PARSE_MD_FIELDS();
#undef VISIT_MD_FIELDS
Result = GET_OR_DISTINCT(MDTemplateTypeParameter,
(Context, scope.Val, name.Val, type.Val));
return false;
}
/// ParseMDTemplateValueParameter:
/// ::= !MDTemplateValueParameter(tag: DW_TAG_template_value_parameter,
/// scope: !0, name: "V", type: !1,
/// value: i32 7)
bool LLParser::ParseMDTemplateValueParameter(MDNode *&Result, bool IsDistinct) {
return TokError("unimplemented parser");
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED) \
REQUIRED(tag, DwarfTagField, ); \
REQUIRED(scope, MDField, ); \
OPTIONAL(name, MDStringField, ); \
REQUIRED(type, MDField, ); \
REQUIRED(value, MDField, );
PARSE_MD_FIELDS();
#undef VISIT_MD_FIELDS
Result = GET_OR_DISTINCT(
MDTemplateValueParameter,
(Context, tag.Val, scope.Val, name.Val, type.Val, value.Val));
return false;
}
bool LLParser::ParseMDGlobalVariable(MDNode *&Result, bool IsDistinct) {
return TokError("unimplemented parser");
}