[region-isolation] Make sil-region-isolation-assert-on-unknown-pattern also work with TransferNonSendable versions of the error.

This asserts only option is an option to make it quicker/easier to triage
unknown pattern match errors by aborting when we emit it (allowing one to
immediately drop into the debugger at that point).

Previously, it only happened for errors in RegionAnalysis not in
TransferNonSendable itself.
This commit is contained in:
Michael Gottesman
2024-07-01 10:57:38 -07:00
parent 465634cada
commit 78d74cf716
3 changed files with 36 additions and 2 deletions

View File

@@ -28,6 +28,12 @@ class RegionAnalysisValueMap;
namespace regionanalysisimpl {
#ifndef NDEBUG
/// Global bool set only when asserts are enabled to ease debugging by causing
/// unknown pattern errors to cause an assert so we drop into the debugger.
extern bool AbortOnUnknownPatternMatchError;
#endif
using TransferringOperandSetFactory = Partition::TransferringOperandSetFactory;
using Element = PartitionPrimitives::Element;
using Region = PartitionPrimitives::Region;