Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Wrighton <davidwr@microsoft.com>2017-11-08 05:19:24 +0300
committerDavid Wrighton <davidwr@microsoft.com>2017-11-08 05:19:24 +0300
commita0495d135109f4f6b60df64883fd1dffa747ae31 (patch)
tree4d55abbb3e618bebd2a3845a360e7448fe110b53
parent7de9c242381df28c455a90dfc8d183aacf5530aa (diff)
Consider types marked as having strong metadata mappings as rooted
[tfs-changeset: 1680506]
-rw-r--r--src/ILCompiler.Compiler/src/Compiler/PrecomputedMetadataManager.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ILCompiler.Compiler/src/Compiler/PrecomputedMetadataManager.cs b/src/ILCompiler.Compiler/src/Compiler/PrecomputedMetadataManager.cs
index f21cedb90..2191198f0 100644
--- a/src/ILCompiler.Compiler/src/Compiler/PrecomputedMetadataManager.cs
+++ b/src/ILCompiler.Compiler/src/Compiler/PrecomputedMetadataManager.cs
@@ -435,6 +435,12 @@ namespace ILCompiler
{
MetadataLoadedInfo loadedMetadata = _loadedMetadata.Value;
+ // Add all non-generic reflectable types as roots.
+ foreach (var type in loadedMetadata.TypesWithStrongMetadataMappings)
+ {
+ rootProvider.AddCompilationRoot(type, "Required non-generic type");
+ }
+
// Add all non-generic reflectable methods as roots.
// Virtual methods need special handling (e.g. with dependency tracking) since they can be abstract.
foreach (var method in loadedMetadata.MethodMappings.Keys)