diff options
author | Sergiy Kuryata <sergeyk@microsoft.com> | 2017-05-09 07:46:10 +0300 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2017-05-09 07:46:10 +0300 |
commit | 95b8075b301f416e8f8a9f24806d25d224bcc3f4 (patch) | |
tree | 6eff3b5342a69a8572b67b2df7080b35a9262f16 /src/ILCompiler.CppCodeGen | |
parent | 5499bb698d81e1160e911125d61a317256ea16e2 (diff) |
Make CppCodegen honor size specification for explicit layout (#3556)
Diffstat (limited to 'src/ILCompiler.CppCodeGen')
-rw-r--r-- | src/ILCompiler.CppCodeGen/src/CppCodeGen/CppWriter.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ILCompiler.CppCodeGen/src/CppCodeGen/CppWriter.cs b/src/ILCompiler.CppCodeGen/src/CppCodeGen/CppWriter.cs index 030fd9ca1..63d3a0213 100644 --- a/src/ILCompiler.CppCodeGen/src/CppCodeGen/CppWriter.cs +++ b/src/ILCompiler.CppCodeGen/src/CppCodeGen/CppWriter.cs @@ -535,6 +535,11 @@ namespace ILCompiler.CppCodeGen if (explicitLayout) { + if (classLayoutMetadata.Size > 0) + { + sb.AppendLine(); + sb.Append("struct { char __sizePadding[" + classLayoutMetadata.Size + "]; };"); + } sb.Exdent(); sb.AppendLine(); sb.Append("};"); |