Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't emit SkipLocalsInit when it's already active #1289

Conversation

jkoritzinsky
Copy link
Member

If SkipLocalsInit is already applied on the module, type, or method level, do not add it when we emit the stub.

…he module as a whole, the containing type, or the stub method
@jkoritzinsky jkoritzinsky added the area-DllImportGenerator Source Generated stubs for P/Invokes in C# label Jul 1, 2021
@jkoritzinsky jkoritzinsky merged commit 7442710 into dotnet:feature/DllImportGenerator Jul 1, 2021
@jkoritzinsky jkoritzinsky deleted the skiplocalsinit-module branch July 1, 2021 19:56
jkoritzinsky added a commit to jkoritzinsky/runtime that referenced this pull request Sep 20, 2021
…#1289)

* Don't emit SkipLocalsInit on each stub if it's already specified on the module as a whole, the containing type, or the stub method

* Precalculate module check and check that first.

Commit migrated from dotnet/runtimelab@7442710
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-DllImportGenerator Source Generated stubs for P/Invokes in C#
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants