Skip to content

Commit

Permalink
add _requiresAlign8 to company and mangled name (#107701)
Browse files Browse the repository at this point in the history
Co-authored-by: yowl <scott.waye@hubse.com>
  • Loading branch information
github-actions[bot] and yowl committed Sep 11, 2024
1 parent 8dc3e06 commit 9abc5de
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ protected override ObjectNodeSection GetDehydratedSection(NodeFactory factory)
public void AppendMangledName(NameMangler nameMangler, Utf8StringBuilder sb)
{
sb.Append("__GCStaticEEType_"u8).Append(_gcMap.ToString());
if (_requiresAlign8)
{
sb.Append("_align8"u8);
}
}

int ISymbolDefinitionNode.Offset
Expand Down Expand Up @@ -107,7 +111,14 @@ protected override ObjectData GetDehydratableData(NodeFactory factory, bool relo

public override int CompareToImpl(ISortableNode other, CompilerComparer comparer)
{
return _gcMap.CompareTo(((GCStaticEETypeNode)other)._gcMap);
GCStaticEETypeNode otherGCStaticEETypeNode = (GCStaticEETypeNode)other;
int mapCompare = _gcMap.CompareTo(otherGCStaticEETypeNode._gcMap);
if (mapCompare == 0)
{
return _requiresAlign8.CompareTo(otherGCStaticEETypeNode._requiresAlign8);
}

return mapCompare;
}
}
}

0 comments on commit 9abc5de

Please sign in to comment.