Ensure that variant part discriminator is read by MetadataLoader
https://reviews.llvm.org/D42082 introduced variant parts to debug info in LLVM. Subsequent work on the Rust compiler has found a bug in that patch; namely, there is a path in MetadataLoader that fails to restore the discriminator. This patch fixes the bug. Patch by: Tom Tromey Differential revision: https://reviews.llvm.org/D52340 llvm-svn: 342725
This commit is contained in:
@@ -1313,7 +1313,7 @@ Error MetadataLoader::MetadataLoaderImpl::parseOneMetadata(
|
||||
(Context, Tag, Name, File, Line, Scope, BaseType,
|
||||
SizeInBits, AlignInBits, OffsetInBits, Flags,
|
||||
Elements, RuntimeLang, VTableHolder, TemplateParams,
|
||||
Identifier));
|
||||
Identifier, Discriminator));
|
||||
if (!IsNotUsedInTypeRef && Identifier)
|
||||
MetadataList.addTypeRef(*Identifier, *cast<DICompositeType>(CT));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user