diff options
author | Simon Nattress <nattress@gmail.com> | 2017-04-08 02:20:54 +0300 |
---|---|---|
committer | Michal Strehovský <MichalStrehovsky@users.noreply.github.com> | 2017-04-08 02:20:54 +0300 |
commit | 947b7bfa7dc04be2490d07496952fd94e49e6a32 (patch) | |
tree | 3d45c549c1870545c2572e128b93faa2bdb07e4b /src/ILCompiler.TypeSystem | |
parent | bed620293c1e52b0794c34e31be8ae9fc9b6661a (diff) |
Correctly mangle names of NativeStructTypes (#3257)
Use the new IPrefixMangledType interface to disambiguate structs with
the same name from different input assemblies.
Diffstat (limited to 'src/ILCompiler.TypeSystem')
-rw-r--r-- | src/ILCompiler.TypeSystem/src/ILCompiler.TypeSystem.csproj | 3 | ||||
-rw-r--r-- | src/ILCompiler.TypeSystem/src/TypeSystem/Interop/IL/NativeStructType.Mangling.cs | 13 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/ILCompiler.TypeSystem/src/ILCompiler.TypeSystem.csproj b/src/ILCompiler.TypeSystem/src/ILCompiler.TypeSystem.csproj index 29f00ca02..6e3855939 100644 --- a/src/ILCompiler.TypeSystem/src/ILCompiler.TypeSystem.csproj +++ b/src/ILCompiler.TypeSystem/src/ILCompiler.TypeSystem.csproj @@ -383,6 +383,9 @@ <Compile Include="..\..\Common\src\TypeSystem\Interop\IL\NativeStructType.cs"> <Link>TypeSystem\Interop\IL\NativeStructType.cs</Link> </Compile> + <Compile Include="TypeSystem\Interop\IL\NativeStructType.Mangling.cs"> + <Link>TypeSystem\Interop\IL\NativeStructType.Mangling.cs</Link> + </Compile> <Compile Include="..\..\Common\src\TypeSystem\Interop\IL\InlineArrayType.cs"> <Link>TypeSystem\Interop\IL\InlineArrayType.cs</Link> </Compile> diff --git a/src/ILCompiler.TypeSystem/src/TypeSystem/Interop/IL/NativeStructType.Mangling.cs b/src/ILCompiler.TypeSystem/src/TypeSystem/Interop/IL/NativeStructType.Mangling.cs new file mode 100644 index 000000000..0ad9e2032 --- /dev/null +++ b/src/ILCompiler.TypeSystem/src/TypeSystem/Interop/IL/NativeStructType.Mangling.cs @@ -0,0 +1,13 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Internal.TypeSystem.Interop +{ + partial class NativeStructType : IPrefixMangledType + { + TypeDesc IPrefixMangledType.BaseType => ManagedStructType; + + string IPrefixMangledType.Prefix => "NativeStructType"; + } +} |