Replace INVALID/INVALID_NOVERIFY with diagnostics.
This replaces the ancient INVALID/INVALID_NOVERIFY macros with a real function. The new invalid(..) function uses small diagnostic objects that are generated on demand. We can store arbitrary additional information per error type and generate useful debug/error messages on the fly. Use it as follows: if (/* Some error condition (ReportFoo) */) invalid<ReportFoo>(Context, /*Assert=*/true/false, (/* List of helpful diagnostic objects */)); Where ReportFoo is a subclass of RejectReason that is able to take the list of helpful diagnostic objects in its constructor. The implementation of invalid will create the report and fire an assertion, if necessary. llvm-svn: 205414
Loading
Please register or sign in to comment