Andrew Kelley 3264abe3d8 stage2: fixes for error union semantics
* Sema: avoid unnecessary safety checks when an error set is empty.
 * Sema: make zirErrorToInt handle comptime errors that are represented
   as integers.
 * Sema: make empty error sets properly integrate with
   typeHasOnePossibleValue.
 * Type: correct the ABI alignment and size of error unions which have
   both zero-bit error set and zero-bit payload. The previous code did
   not account for the fact that we still need to store a bit for
   whether there is an error.
 * LLVM: lower error unions possibly with the payload first or with the
   error code first, depending on alignment. Previously it always put
   the error code first and used a padding array.
 * LLVM: lower functions which have an empty error set as the return
   type the same as anyerror, so that they can be used where
   fn()anyerror function pointers are expected. In such functions, Zig
   will lower ret to returning zero instead of void.

As a result, one more behavior test is passing.
2022-05-24 15:34:52 -07:00
..
2022-05-16 17:43:44 -04:00
2022-04-24 23:01:06 -04:00
2022-05-17 22:04:12 +01:00
2022-05-13 16:43:59 -04:00
2022-05-13 16:43:59 -04:00
2022-03-08 20:38:12 +02:00
2022-04-20 17:18:06 -07:00
2022-01-07 00:06:06 -05:00
2022-04-14 10:12:45 -07:00
2022-05-13 16:43:59 -04:00
2022-05-13 16:43:59 -04:00
2022-04-15 17:01:01 -05:00
2022-01-07 00:06:06 -05:00
2022-01-29 13:57:14 +11:00