Skip to content

Commit

Permalink
Fix name mangling for CoreLib (dotnet#102183)
Browse files Browse the repository at this point in the history
dotnet#96983 broke name mangling within corelib - we were not prepending the assembly name and not replacing dots with underscores.
  • Loading branch information
MichalStrehovsky authored and Ruihan-Yin committed May 30, 2024
1 parent fb5a18a commit 04056d4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/coreclr/tools/Common/Compiler/NativeAotNameMangler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ private string ComputeMangledTypeName(TypeDesc type)
containingType = containingType.ContainingType;
}

name = prependAssemblyName + "_" + SanitizeName(name, true);

// If this is one of the well known types, use a shorter name
// We know this won't conflict because all the other types are
// prefixed by the assembly name.
Expand Down Expand Up @@ -231,10 +233,6 @@ private string ComputeMangledTypeName(TypeDesc type)
break;
}
}
else
{
name = prependAssemblyName + "_" + SanitizeName(name, true);
}

// Ensure that name is unique and update our tables accordingly.
name = DisambiguateName(name, deduplicator);
Expand Down

0 comments on commit 04056d4

Please sign in to comment.