diff options
author | Vitek Karas <vitek.karas@microsoft.com> | 2021-08-18 17:20:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-18 17:20:54 +0300 |
commit | e9403e206860e9569ea59af8f3241922564c8c2b (patch) | |
tree | 8327f75b7e10e4751de1a191c7b6852c3ac5cf56 /test/Mono.Linker.Tests.Cases.Expectations | |
parent | 5b2391c2c56af47350a5789375e8dbddc692e67f (diff) |
Implement a custom ILProcessor and make it auto-fix IL corruptions (#2213)
Cecil doesn't handle IL editing well. It doesn't patch scopes and branches. Added a linker-private IL processor which does this.
Added tests for the IL corruption when removing branches around code which has exception handlers.
I also removed now unnecessary test attribute, since in my previous change the exception handlers are now validated within the instruction stream, so no need for a second attribute to validate these.
Co-authored-by: Sven Boemer <sbomer@gmail.com>
Diffstat (limited to 'test/Mono.Linker.Tests.Cases.Expectations')
-rw-r--r-- | test/Mono.Linker.Tests.Cases.Expectations/Assertions/ExpectedExceptionHandlerSequenceAttribute.cs | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/test/Mono.Linker.Tests.Cases.Expectations/Assertions/ExpectedExceptionHandlerSequenceAttribute.cs b/test/Mono.Linker.Tests.Cases.Expectations/Assertions/ExpectedExceptionHandlerSequenceAttribute.cs deleted file mode 100644 index 0c9f10e4a..000000000 --- a/test/Mono.Linker.Tests.Cases.Expectations/Assertions/ExpectedExceptionHandlerSequenceAttribute.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; - -namespace Mono.Linker.Tests.Cases.Expectations.Assertions -{ - [AttributeUsage (AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false, AllowMultiple = false)] - public class ExpectedExceptionHandlerSequenceAttribute : BaseInAssemblyAttribute - { - public ExpectedExceptionHandlerSequenceAttribute (string[] types) - { - if (types == null) - throw new ArgumentNullException (nameof (types)); - } - } -}
\ No newline at end of file |