Skip to content

Commit bad00cf

Browse files
Fix name mangling for CoreLib (#102183)
#96983 broke name mangling within corelib - we were not prepending the assembly name and not replacing dots with underscores.
1 parent 8c1e166 commit bad00cf

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/coreclr/tools/Common/Compiler/NativeAotNameMangler.cs

+2-4
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@ private string ComputeMangledTypeName(TypeDesc type)
202202
containingType = containingType.ContainingType;
203203
}
204204

205+
name = prependAssemblyName + "_" + SanitizeName(name, true);
206+
205207
// If this is one of the well known types, use a shorter name
206208
// We know this won't conflict because all the other types are
207209
// prefixed by the assembly name.
@@ -231,10 +233,6 @@ private string ComputeMangledTypeName(TypeDesc type)
231233
break;
232234
}
233235
}
234-
else
235-
{
236-
name = prependAssemblyName + "_" + SanitizeName(name, true);
237-
}
238236

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

0 commit comments

Comments
 (0)