IR: Drop scope from MDTemplateParameter

Follow-up to r229740, which removed `DITemplate*::getContext()` after my
upgrade script revealed that scopes are always `nullptr` for template
parameters.  This is the other shoe: drop `scope:` from
`MDTemplateParameter` and its two subclasses.  (Note: a bitcode upgrade
would be pointless, since the hierarchy hasn't been moved into place.)

llvm-svn: 229791
This commit is contained in:
Duncan P. N. Exon Smith
2015-02-19 00:37:21 +00:00
parent ca929f2469
commit 3d62bbacb1
15 changed files with 97 additions and 147 deletions

View File

@@ -1515,25 +1515,24 @@ std::error_code BitcodeReader::ParseMetadata() {
break;
}
case bitc::METADATA_TEMPLATE_TYPE: {
if (Record.size() != 4)
if (Record.size() != 3)
return Error("Invalid record");
MDValueList.AssignValue(
GET_OR_DISTINCT(MDTemplateTypeParameter, Record[0],
(Context, getMDOrNull(Record[1]),
getMDString(Record[2]), getMDOrNull(Record[3]))),
NextMDValueNo++);
MDValueList.AssignValue(GET_OR_DISTINCT(MDTemplateTypeParameter,
Record[0],
(Context, getMDString(Record[1]),
getMDOrNull(Record[2]))),
NextMDValueNo++);
break;
}
case bitc::METADATA_TEMPLATE_VALUE: {
if (Record.size() != 6)
if (Record.size() != 5)
return Error("Invalid record");
MDValueList.AssignValue(
GET_OR_DISTINCT(MDTemplateValueParameter, Record[0],
(Context, Record[1], getMDOrNull(Record[2]),
getMDString(Record[3]), getMDOrNull(Record[4]),
getMDOrNull(Record[5]))),
(Context, Record[1], getMDString(Record[2]),
getMDOrNull(Record[3]), getMDOrNull(Record[4]))),
NextMDValueNo++);
break;
}