You've already forked linux-packaging-mono
Imported Upstream version 5.8.0.22
Former-commit-id: df344e34b07851d296efb3e6604c8db42b6f7aa3
This commit is contained in:
parent
5f4a27cc8a
commit
7d05485754
24
external/linker/corebuild/integration/ILLink.CustomSteps/ClearInitLocals.cs
vendored
Normal file
24
external/linker/corebuild/integration/ILLink.CustomSteps/ClearInitLocals.cs
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
|
||||
using Mono.Linker;
|
||||
using Mono.Linker.Steps;
|
||||
using Mono.Cecil;
|
||||
|
||||
namespace ILLink.CustomSteps
|
||||
{
|
||||
public class ClearInitLocalsStep : BaseStep
|
||||
{
|
||||
protected override void ProcessAssembly(AssemblyDefinition assembly)
|
||||
{
|
||||
foreach (ModuleDefinition module in assembly.Modules) {
|
||||
foreach (TypeDefinition type in module.Types) {
|
||||
foreach (MethodDefinition method in type.Methods) {
|
||||
if (method.Body != null) {
|
||||
method.Body.InitLocals = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user