zig/test/behavior
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-03-18 15:02:52 -07:00
2022-02-13 14:42:20 +02:00
2022-07-14 18:11:46 -07:00
2022-02-22 21:57:42 +01:00
2022-03-18 00:12:22 -07:00
2022-03-18 15:02:52 -07:00
2022-09-09 19:17:18 +02:00
2022-08-26 00:00:22 -04:00