Fix sequential layout for classes (dotnet/coreclr#27766)
authorJan Vorlicek <janvorli@microsoft.com>
Fri, 8 Nov 2019 14:50:44 +0000 (15:50 +0100)
committerGitHub <noreply@github.com>
Fri, 8 Nov 2019 14:50:44 +0000 (15:50 +0100)
commit9aaad8dc7d1a90c6da05812b7b5e40b5d6f1ffee
tree76a19c1c1476c0bdadbf2b836d7cae53437ea4cb
parentdc12304a2b1968c756d4dc6b890518c6a829fcb7
Fix sequential layout for classes (dotnet/coreclr#27766)

This fixes 15 pri 1 coreclr tests in
JIT\Methodical\explicit\coverage\seq_gc_*
These tests are using the StructLayout(LayoutKind.Sequential) attribute on a class and
crossgen2 was willing to generate sequential layout on value types only.

This change fixes it.

Commit migrated from https://github.com/dotnet/coreclr/commit/6f9cdc4529b93a812000513fcdde27f107d35c1e
src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/Compiler/ReadyToRunMetadataFieldLayoutAlgorithm.cs