diff options
author | Michal Strehovský <michals@microsoft.com> | 2017-12-28 23:04:21 +0300 |
---|---|---|
committer | Michal Strehovský <michals@microsoft.com> | 2017-12-28 23:04:21 +0300 |
commit | 8ec2a141e57b8b2da941bddc547927e6bb97b262 (patch) | |
tree | 0b41be3e1fecb867da00e4e8b786696340818cac | |
parent | 3063f7a1b61efb3a2a4b34892e90f830d0849ef4 (diff) |
Include owning type of a method as an invoke map dependency
The reflection mapping table needs it and the reflection stack can't really invoke a method without its owning type EEType.
-rw-r--r-- | src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/CodeBasedDependencyAlgorithm.cs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/CodeBasedDependencyAlgorithm.cs b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/CodeBasedDependencyAlgorithm.cs index 4a8a0370a..be47cef80 100644 --- a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/CodeBasedDependencyAlgorithm.cs +++ b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/CodeBasedDependencyAlgorithm.cs @@ -23,6 +23,8 @@ namespace ILCompiler.DependencyAnalysis if (dependencies == null) dependencies = new DependencyList(); + dependencies.Add(factory.MaximallyConstructableType(method.OwningType), "Reflection invoke"); + if (factory.MetadataManager.HasReflectionInvokeStubForInvokableMethod(method) && ((factory.Target.Abi != TargetAbi.ProjectN) || ProjectNDependencyBehavior.EnableFullAnalysis || !method.IsCanonicalMethod(CanonicalFormKind.Any))) { |