Jacob Young
cb0e22db4e
llvm: fix lowering of runtime refs to comptime-only decls
...
When we want a runtime pointer to a zero-bit value we use an undef
pointer, but what if we want a runtime pointer to a comptime-only value?
Normally, if `T` is a comptime-only type such as `*const comptime_int`,
then `*const T` would also be a comptime-only type, so anything
referencing a comptime-only value is usually also comptime-only, and
therefore not emitted to the executable.
However, what if instead we have a `*const anyopaque` pointing to a
comptime-only value? Certainly, `*const anyopaque` is a runtime type,
and so we need some runtime value to store, even when it happens to be
pointing to a comptime-only value. In this case we want to do the same
thing as we do when pointing to a zero-bit value, so we use
`hasRuntimeBits` to handle both cases instead of ignoring comptime.
Closes #12025
2022-10-15 14:17:25 -04:00
..
2022-10-15 14:17:25 -04:00
2022-10-13 12:53:20 -07:00
2022-09-09 19:17:17 +02:00
2022-10-05 21:19:10 +02:00
2022-06-12 14:46:05 -07:00
2022-03-23 14:06:07 -07:00
2022-06-24 21:19:33 +07:00
2022-03-23 14:06:07 -07:00
2022-10-05 21:19:30 +02:00
2022-02-14 22:33:01 +01:00
2022-09-09 19:17:18 +02:00
2022-08-22 11:19:20 +03:00
2022-08-22 11:19:20 +03:00
2022-06-25 21:16:51 +02:00
2022-08-30 12:50:15 -07:00
2022-03-18 15:02:52 -07:00
2022-09-20 00:50:13 +03:00
2022-09-09 19:17:17 +02:00
2022-09-09 19:17:18 +02:00
2022-02-13 14:42:20 +02:00
2022-09-12 01:52:44 -04:00
2022-08-17 23:03:04 +03:00
2022-10-13 12:53:20 -07:00
2022-10-10 23:27:17 +02:00
2022-10-13 12:53:20 -07:00
2022-03-08 11:23:38 +02:00
2022-10-12 04:38:07 -04:00
2022-09-09 19:17:17 +02:00
2022-08-17 14:09:09 -07:00
2022-05-27 16:43:11 -04:00
2022-08-22 11:16:36 +03:00
2022-09-09 20:26:04 +02:00
2022-09-24 14:43:03 +03:00
2022-03-11 12:59:20 -07:00
2022-07-14 18:11:46 -07:00
2022-06-29 17:19:49 +02:00
2022-10-08 16:58:52 +03:00
2022-05-18 07:43:33 +02:00
2022-03-19 21:01:36 -04:00
2022-03-05 11:31:51 +01:00
2022-02-28 23:20:05 +01:00
2022-10-05 21:19:30 +02:00
2022-04-02 21:54:01 +02:00
2022-02-22 21:57:42 +01:00
2022-09-09 19:17:17 +02:00
2022-10-13 12:53:30 -07:00
2022-03-17 11:39:56 -07:00
2022-03-17 11:39:56 -07:00
2022-08-25 16:15:48 -07:00
2022-08-10 19:54:45 +02:00
2022-10-13 12:53:20 -07:00
2022-10-05 17:26:29 +03:00
2022-08-22 11:19:20 +03:00
2022-09-09 19:17:18 +02:00
2022-02-22 21:57:42 +01:00
2022-06-25 21:16:51 +02:00
2022-06-19 17:27:56 +02:00
2022-03-25 19:14:11 +01:00
2022-05-25 00:12:56 -07:00
2022-10-06 20:09:45 +03:00
2022-10-12 12:40:59 +03:00
2022-03-01 23:46:57 -07:00
2022-03-16 20:19:58 +01:00
2022-06-25 21:16:51 +02:00
2022-10-05 21:19:30 +02:00
2022-03-09 13:53:20 -07:00
2022-03-09 13:53:20 -07:00
2022-09-09 19:17:18 +02:00
2022-09-09 19:17:17 +02:00
2022-09-10 01:50:17 +03:00
2022-09-07 14:46:58 +03:00
2022-09-10 01:50:17 +03:00
2022-10-05 21:19:30 +02:00
2022-09-09 19:17:17 +02:00
2022-08-28 15:41:21 +03:00
2022-09-20 00:50:13 +03:00
2022-09-20 00:50:13 +03:00
2022-09-24 16:30:37 +03:00
2022-03-18 00:12:22 -07:00
2022-05-22 21:02:32 +02:00
2022-03-18 15:02:52 -07:00
2022-09-09 19:17:18 +02:00
2022-09-09 19:17:18 +02:00
2022-06-25 21:16:51 +02:00
2022-10-13 12:53:20 -07:00
2022-08-26 00:00:22 -04:00
2022-03-03 18:31:55 -07:00
2022-09-09 19:17:17 +02:00
2022-06-25 21:16:51 +02:00
2022-01-29 18:12:28 +02:00