Save mangled name in module graph

This commit is contained in:
nub31
2026-02-15 02:55:11 +01:00
parent ee485e4119
commit c342b2e102
5 changed files with 63 additions and 30 deletions

View File

@@ -71,7 +71,7 @@ public record Manifest(Dictionary<string, Manifest.Module> Modules)
foreach (var module in moduleGraph.GetModules())
{
var types = module.GetTypes().ToDictionary(x => x.Key, x => ConvertType(x.Value));
var identifiers = module.GetIdentifiers().ToDictionary(x => x.Key, x => new Module.IdentifierInfo(x.Value.Exported, x.Value.Type));
var identifiers = module.GetIdentifiers().ToDictionary(x => x.Key, x => new Module.IdentifierInfo(x.Value.Exported, x.Value.Type, x.Value.MangledName));
modules[module.Name] = new Module(types, identifiers);
}
@@ -90,7 +90,7 @@ public record Manifest(Dictionary<string, Manifest.Module> Modules)
public record Module(Dictionary<string, Module.TypeInfo> Types, Dictionary<string, Module.IdentifierInfo> Identifiers)
{
public record IdentifierInfo(bool Exported, NubType Type);
public record IdentifierInfo(bool Exported, NubType Type, string MangledName);
[JsonDerivedType(typeof(TypeInfoStruct), "struct")]
public abstract record TypeInfo(bool Exported);