parent
f4c2a9f02a
commit
3d913cda5f
|
@ -837,12 +837,14 @@ bool BitcodeReader::ParseMetadata() {
|
|||
SmallString<8> Name;
|
||||
Name.resize(RecordLength-1);
|
||||
unsigned Kind = Record[0];
|
||||
(void) Kind;
|
||||
for (unsigned i = 1; i != RecordLength; ++i)
|
||||
Name[i-1] = Record[i];
|
||||
MetadataContext &TheMetadata = Context.getMetadata();
|
||||
unsigned ExistingKind = TheMetadata.getMDKind(Name.str());
|
||||
if (ExistingKind == 0) {
|
||||
unsigned NewKind = TheMetadata.registerMDKind(Name.str());
|
||||
(void) NewKind;
|
||||
assert (Kind == NewKind
|
||||
&& "Unable to handle custom metadata mismatch!");
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue