diff options
author | Michal Strehovský <MichalStrehovsky@users.noreply.github.com> | 2016-09-29 20:15:00 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-29 20:15:00 +0300 |
commit | c3ca2569276c7985e6c2189bdd2bd94e3e346999 (patch) | |
tree | c347a15b2710f14c10e559a5c826854ba06e4e57 /src/ILCompiler.DependencyAnalysisFramework | |
parent | 8f8fe712fcb78524843e4969088679fed45eb519 (diff) |
Make GetName protected internal (#1946)
`GetName` is "get the name to be used in the diagnostic log". The rules
around it in the compier are:
* if the node is a `ISymbolNode` it should include the mangled name so
that it's easy to crossreference it with the object file (doesn't
necessarily have to be equal to the mangled name - see EETypeNode and
friends that append "constructed", etc.)
* if the node is not an `ISymbolNode`, get something that will be useful
to search for in the dependency log
I'm making the API protected and internal to avoid misuse and fixing the
places misusing this API (the spot in ObjectWriter was just wrong,
CppWriter was okay, but with problems waiting to happen).
I'm also unsealing ToString. We'll want to override it on a case-by-case
basis to make debugger experience more pleasant.
Diffstat (limited to 'src/ILCompiler.DependencyAnalysisFramework')
-rw-r--r-- | src/ILCompiler.DependencyAnalysisFramework/src/DependencyNode.cs | 4 | ||||
-rw-r--r-- | src/ILCompiler.DependencyAnalysisFramework/tests/TestGraph.cs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/ILCompiler.DependencyAnalysisFramework/src/DependencyNode.cs b/src/ILCompiler.DependencyAnalysisFramework/src/DependencyNode.cs index 47ee408d5..6167b6963 100644 --- a/src/ILCompiler.DependencyAnalysisFramework/src/DependencyNode.cs +++ b/src/ILCompiler.DependencyAnalysisFramework/src/DependencyNode.cs @@ -40,9 +40,9 @@ namespace ILCompiler.DependencyAnalysisFramework } // Force all non-abstract nodes to provide a name - public abstract string GetName(); + protected internal abstract string GetName(); - public sealed override string ToString() + public override string ToString() { return GetName(); } diff --git a/src/ILCompiler.DependencyAnalysisFramework/tests/TestGraph.cs b/src/ILCompiler.DependencyAnalysisFramework/tests/TestGraph.cs index 7386c2d54..21c9522d7 100644 --- a/src/ILCompiler.DependencyAnalysisFramework/tests/TestGraph.cs +++ b/src/ILCompiler.DependencyAnalysisFramework/tests/TestGraph.cs @@ -31,7 +31,7 @@ namespace ILCompiler.DependencyAnalysisFramework.Tests } } - public override string GetName() + protected override string GetName() { return _data; } |