Add switch to crossgen2 to ignore compile failures (dotnet/coreclr#26793)
authorDavid Wrighton <davidwr@microsoft.com>
Mon, 23 Sep 2019 23:23:16 +0000 (16:23 -0700)
committerGitHub <noreply@github.com>
Mon, 23 Sep 2019 23:23:16 +0000 (16:23 -0700)
commit0a37b33835d953f73efec65ee30e827663ec08af
tree33737207d1fbee4eac3777d672b20174145987bd
parentc4b1518488125b8db2dcc5761d843a58dd153e6a
parent78e6f855c41afcfcd218f130ea416501622c81a1
Add switch to crossgen2 to ignore compile failures (dotnet/coreclr#26793)

* Add switch to crossgen2 to ignore compile failures
- the default failure behavior is good for most cases, but it is a problem when not actively working on codegen issues
- Method name printing is a risky process as it may throw. This changeset implements a ToString algorithm which attempts to print something even in the presence of errors

* Add back using statement removed in master branch

* Make ToString reslient to metadata loading failures
- Add a DiagnosticName property to type system constructs that have a Name property that may fail
- Workaround issue where Category cannot be reliably computed, and so instead use switch on type (as that is sufficient for this need)

* Switch to --resilient for switch name, and remove separate resilient name computation

* Review feedback

* More feedback

* More feedback

Commit migrated from https://github.com/dotnet/coreclr/commit/17f687ecf74eedd1ca80b2649381b8207178ba91