Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Commit

Permalink
Remove unnecessary IsReflectionBlocked check
Browse files Browse the repository at this point in the history
GetTypesWithRuntimeMapping already filters out the reflection blocked types.
  • Loading branch information
MichalStrehovsky committed Sep 24, 2018
1 parent ac12622 commit 67fcc10
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/ILCompiler.Compiler/src/Compiler/UsageBasedMetadataManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -276,17 +276,14 @@ public MetadataManager ToAnalysisBasedMetadataManager()

foreach (var constructedType in GetTypesWithRuntimeMapping())
{
if (!IsReflectionBlocked(constructedType))
{
reflectableTypes[constructedType] |= MetadataCategory.RuntimeMapping;
reflectableTypes[constructedType] |= MetadataCategory.RuntimeMapping;

// Also set the description bit if the definition is getting metadata.
TypeDesc constructedTypeDefinition = constructedType.GetTypeDefinition();
if (constructedType != constructedTypeDefinition &&
(reflectableTypes[constructedTypeDefinition] & MetadataCategory.Description) != 0)
{
reflectableTypes[constructedType] |= MetadataCategory.Description;
}
// Also set the description bit if the definition is getting metadata.
TypeDesc constructedTypeDefinition = constructedType.GetTypeDefinition();
if (constructedType != constructedTypeDefinition &&
(reflectableTypes[constructedTypeDefinition] & MetadataCategory.Description) != 0)
{
reflectableTypes[constructedType] |= MetadataCategory.Description;
}
}

Expand Down

0 comments on commit 67fcc10

Please sign in to comment.