Do not generate broken debug info for non-methods#94693
Do not generate broken debug info for non-methods#94693MichalStrehovsky merged 1 commit intodotnet:mainfrom
Conversation
The related methods (`EmitDebugInfo`, `EmitEHClauseInfo`) already do this - if the node is not a method node, don't emit anything. It is not clear what purpose the "if this is not a method, emit broken debug information" serves. I traced it all the way back to https://github.com/dotnet/corert/blob/d78cf62480331f63b26eb08b86b838ffa355ff0d/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/ObjectWriter.cs#L427-L447 - it was surrounded by TODOs so maybe it didn't fully stand out but it doesn't look right there already.
|
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsFixes #94650. The related methods ( Cc @dotnet/ilc-contrib
|
|
cc @filipnavara - in case this needs porting to the managed objwriter |
|
.NET 8 backport candidate? |
Thanks for the heads up. I need to update it here. In my case it's actually mostly eliminated by the check in the caller method but this makes it easier to reason about. |
|
/backport to release/8.0-staging |
|
Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/6874512132 |
Fixes #94650.
The related methods (
EmitDebugInfo,EmitEHClauseInfo) already do this - if the node is not a method node, don't emit anything. It is not clear what purpose the "if this is not a method, emit broken debug information" serves. I traced it all the way back to https://github.com/dotnet/corert/blob/d78cf62480331f63b26eb08b86b838ffa355ff0d/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/ObjectWriter.cs#L427-L447 - it was surrounded by TODOs so it didn't fully stand out but it doesn't look right there already.Cc @dotnet/ilc-contrib