Skip to content
This repository was archived by the owner on Nov 1, 2020. It is now read-only.

Commit 53935c5

Browse files
Merge pull request #630 from MichalStrehovsky/typedefEarlyOut
Add early out for generic type definitions EETypes
2 parents 92d9aee + cfc8512 commit 53935c5

File tree

1 file changed

+8
-0
lines changed
  • src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis

1 file changed

+8
-0
lines changed

src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/EETypeNode.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,14 @@ public override ObjectData GetData(NodeFactory factory, bool relocsOnly)
130130
objData.Alignment = 16;
131131
objData.DefinedSymbols.Add(this);
132132

133+
// Todo: Generic Type Definition EETypes
134+
// Early-out just to prevent crashing at compile time...
135+
if (_type.HasInstantiation && _type.IsTypeDefinition)
136+
{
137+
objData.EmitZeroPointer();
138+
return objData.ToObjectData();
139+
}
140+
133141
ComputeOptionalEETypeFields(factory);
134142
if (null == _optionalFieldsNode)
135143
{

0 commit comments

Comments
 (0)