0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/test
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
History 2022-10-15 14:17:25 -04:00
..
behavior llvm: fix lowering of runtime refs to comptime-only decls 2022-10-15 14:17:25 -04:00
c_abi C ABI: Add tests for complex float/double support 2022-10-09 23:24:29 -07:00
cases fix hyphenation in test case 2022-10-12 16:10:57 +03:00
link test/link: don't strip producers section for wasm 2022-10-11 21:27:09 +02:00
src std lib API deprecations for the upcoming 0.9.0 release 2021-11-30 00:13:07 -07:00
stage2 fix test 2022-10-15 10:39:19 -07:00
standalone stage2: fix emitting asm and bin at the same time 2022-10-14 14:46:50 -04:00
assemble_and_link.zig migrate from std.Target.current to @import("builtin").target 2021-10-04 23:48:55 -07:00
behavior.zig llvm: fix lowering of runtime refs to comptime-only decls 2022-10-15 14:17:25 -04:00
cases.zig re-enable nvptx tests 2022-10-15 10:39:19 -07:00
cli.zig Compilation: strip debug info from ReleaseSmall by default 2022-10-11 17:51:25 +02:00
compare_output.zig validate number literals in AstGen 2022-09-13 20:26:04 -04:00
compile_errors.zig fix(text): hyphenate "comptime" adjectives 2022-10-05 21:19:30 +02:00
gen_h.zig run zig fmt on src/ and test/ 2020-10-31 12:21:49 +02:00
link.zig test/link: Add linker test for producers section 2022-10-08 09:43:40 +02:00
run_translated_c.zig translate-c: Fix #12263 2022-10-10 22:29:56 +02:00
stack_traces.zig test-stack-traces: restore test coverage 2022-08-24 12:57:31 -07:00
standalone.zig i386 ABI: Fix some sizes and alignments 2022-10-14 15:22:00 -04:00
tests.zig tests: Enable PPC64LE as a test target 2022-10-13 12:53:20 -07:00
translate_c.zig Update translate-c tests 2022-10-11 00:43:53 +02:00