Skip to content

Commit

Permalink
Fix name mangling for CoreLib (#102183)
Browse files Browse the repository at this point in the history
#96983 broke name mangling within corelib - we were not prepending the assembly name and not replacing dots with underscores.
  • Loading branch information
MichalStrehovsky authored May 14, 2024
1 parent 8c1e166 commit bad00cf
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 bad00cf

Please sign in to comment.