diff options
Diffstat (limited to 'src/ILCompiler.CppCodeGen')
-rw-r--r-- | src/ILCompiler.CppCodeGen/src/Compiler/DependencyAnalysis/CppMethodCodeNode.cs | 7 | ||||
-rw-r--r-- | src/ILCompiler.CppCodeGen/src/CppCodeGen/CppWriter.cs | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/ILCompiler.CppCodeGen/src/Compiler/DependencyAnalysis/CppMethodCodeNode.cs b/src/ILCompiler.CppCodeGen/src/Compiler/DependencyAnalysis/CppMethodCodeNode.cs index 16ab08d5d..70a138649 100644 --- a/src/ILCompiler.CppCodeGen/src/Compiler/DependencyAnalysis/CppMethodCodeNode.cs +++ b/src/ILCompiler.CppCodeGen/src/Compiler/DependencyAnalysis/CppMethodCodeNode.cs @@ -75,5 +75,12 @@ namespace ILCompiler.DependencyAnalysis public override IEnumerable<CombinedDependencyListEntry> GetConditionalStaticDependencies(NodeFactory factory) => null; public override IEnumerable<CombinedDependencyListEntry> SearchDynamicDependencies(List<DependencyNodeCore<NodeFactory>> markedNodes, int firstNode, NodeFactory factory) => null; + + int ISortableSymbolNode.ClassCode => 1643555522; + + int ISortableSymbolNode.CompareToImpl(ISortableSymbolNode other, CompilerComparer comparer) + { + return comparer.Compare(_method, ((CppMethodCodeNode)other)._method); + } } } diff --git a/src/ILCompiler.CppCodeGen/src/CppCodeGen/CppWriter.cs b/src/ILCompiler.CppCodeGen/src/CppCodeGen/CppWriter.cs index 22b3352bc..be4301303 100644 --- a/src/ILCompiler.CppCodeGen/src/CppCodeGen/CppWriter.cs +++ b/src/ILCompiler.CppCodeGen/src/CppCodeGen/CppWriter.cs @@ -1005,6 +1005,10 @@ namespace ILCompiler.CppCodeGen //RTR header needs to be declared after all modules have already been output string rtrHeader = string.Empty; + // GetData stabilizes the indices of the embedded objects. This must be done manually + // for C++ codegen since we don't currently emit the DispatchMapTable node directly. + factory.DispatchMapTable.GetData(factory, false); + // Iterate through nodes foreach (var node in nodeIterator.GetNodes()) { |