summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Reader
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-19 00:37:21 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-19 00:37:21 +0000
commit3d62bbacb1aa918944f0cc966381f44e13582b4a (patch)
tree11ef811398091ec13469ff532758c8d0ba7d2008 /llvm/lib/Bitcode/Reader
parentca929f24699a05cf22d4337278e5fea962799632 (diff)
downloadbcm5719-llvm-3d62bbacb1aa918944f0cc966381f44e13582b4a.tar.gz
bcm5719-llvm-3d62bbacb1aa918944f0cc966381f44e13582b4a.zip
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
Diffstat (limited to 'llvm/lib/Bitcode/Reader')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index ca4d66a540b..649057dddf0 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -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;
}
OpenPOWER on IntegriCloud