mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Hide MetadataContext implementation details.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84886 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -840,7 +840,15 @@ bool BitcodeReader::ParseMetadata() {
|
||||
for (unsigned i = 1; i != RecordLength; ++i)
|
||||
Name[i-1] = Record[i];
|
||||
MetadataContext &TheMetadata = Context.getMetadata();
|
||||
TheMetadata.MDHandlerNames[Name.str()] = Kind;
|
||||
unsigned ExistingKind = TheMetadata.getMDKind(Name.str());
|
||||
if (ExistingKind == 0) {
|
||||
unsigned NewKind = TheMetadata.registerMDKind(Name.str());
|
||||
assert (Kind == NewKind
|
||||
&& "Unable to handle custom metadata mismatch!");
|
||||
} else {
|
||||
assert (ExistingKind == Kind
|
||||
&& "Unable to handle custom metadata mismatch!");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user