1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
4 
5 using Internal.IL;
6 
7 namespace ILCompiler
8 {
9     /// <summary>
10     /// Provides debug information for ECMA-based <see cref="MethodIL"/> only.
11     /// </summary>
12     public class EcmaOnlyDebugInformationProvider : DebugInformationProvider
13     {
GetDebugInfo(MethodIL methodIL)14         public override MethodDebugInformation GetDebugInfo(MethodIL methodIL)
15         {
16             MethodIL definitionIL = methodIL.GetMethodILDefinition();
17             if (definitionIL is EcmaMethodIL)
18                 return methodIL.GetDebugInfo();
19 
20             return MethodDebugInformation.None;
21         }
22     }
23 }
24