stage2: make hasCodeGenBits() always true for pointers
* LLVM backend: The `alloc` AIR instruction as well as pointer constants which point to a 0-bit element type now call a common codepath to produce a `*const llvm.Value` which is a non-zero pointer with a bogus-but-properly-aligned address. * LLVM backend: improve the lowering of optional types. * Type: `hasCodeGenBits()` now returns `true` for pointers even when it returns `false` for their element types. Effectively, #6706 is now implemented in stage2 but not stage1.
This commit is contained in:
@@ -246,7 +246,7 @@ fn testTakeAddressOfParameter(f: f32) !void {
|
||||
}
|
||||
|
||||
test "pointer to void return type" {
|
||||
testPointerToVoidReturnType() catch unreachable;
|
||||
try testPointerToVoidReturnType();
|
||||
}
|
||||
fn testPointerToVoidReturnType() anyerror!void {
|
||||
const a = testPointerToVoidReturnType2();
|
||||
|
||||
Reference in New Issue
Block a user