expose forward definitions in AppModel, fix issue with method-only used types not being emitted
This commit is contained in:
@@ -40,6 +40,9 @@ namespace Il2CppInspector.Model
|
|||||||
// The types are ordered to enable the production of code output without forward dependencies
|
// The types are ordered to enable the production of code output without forward dependencies
|
||||||
public List<CppType> DependencyOrderedCppTypes { get; private set; }
|
public List<CppType> DependencyOrderedCppTypes { get; private set; }
|
||||||
|
|
||||||
|
// Required forward definition types for the C++ type definitions
|
||||||
|
public List<CppType> RequiredForwardDefinitions { get; private set; } = [];
|
||||||
|
|
||||||
// Composite mapping of all the .NET methods in the IL2CPP binary
|
// Composite mapping of all the .NET methods in the IL2CPP binary
|
||||||
public MultiKeyDictionary<MethodBase, CppFnPtrType, AppMethod> Methods { get; } = new MultiKeyDictionary<MethodBase, CppFnPtrType, AppMethod>();
|
public MultiKeyDictionary<MethodBase, CppFnPtrType, AppMethod> Methods { get; } = new MultiKeyDictionary<MethodBase, CppFnPtrType, AppMethod>();
|
||||||
|
|
||||||
@@ -247,7 +250,7 @@ namespace Il2CppInspector.Model
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
AddTypes(declarationGenerator.GenerateRemainingTypeDeclarations());
|
AddTypes(definitions);
|
||||||
|
|
||||||
// Any method here SHOULD already be in the Methods list
|
// Any method here SHOULD already be in the Methods list
|
||||||
// but we have seen one example where this is not the case for a MethodDef
|
// but we have seen one example where this is not the case for a MethodDef
|
||||||
@@ -305,6 +308,8 @@ namespace Il2CppInspector.Model
|
|||||||
declarationGenerator.IncludeType(type);
|
declarationGenerator.IncludeType(type);
|
||||||
AddTypes(declarationGenerator.GenerateRemainingTypeDeclarations());
|
AddTypes(declarationGenerator.GenerateRemainingTypeDeclarations());
|
||||||
|
|
||||||
|
RequiredForwardDefinitions = declarationGenerator.GenerateRequiredForwardDefinitions();
|
||||||
|
|
||||||
// Restore stdout
|
// Restore stdout
|
||||||
Console.SetOut(stdout);
|
Console.SetOut(stdout);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user