diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-06-01 15:43:21 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-06-01 15:43:21 -0700 |
| commit | b82cccc9e9b2230097f81fecec12ac0fdae97518 (patch) | |
| tree | ce1cf7a47b20f4dc2fc1c2d9f1033b396027a555 /src/type.zig | |
| parent | b095aa6986badc3b8c2255ad2c824ca4ea9959d9 (diff) | |
| download | zig-b82cccc9e9b2230097f81fecec12ac0fdae97518.tar.gz zig-b82cccc9e9b2230097f81fecec12ac0fdae97518.zip | |
Sema: fix alignment of element ptr result type
Diffstat (limited to 'src/type.zig')
| -rw-r--r-- | src/type.zig | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/type.zig b/src/type.zig index 94fcd0a96c..fc9841e28b 100644 --- a/src/type.zig +++ b/src/type.zig @@ -4177,20 +4177,6 @@ pub const Type = extern union { }; } - /// Returns the type of a pointer to an element. - /// Asserts that the type is a pointer, and that the element type is indexable. - /// For *[N]T, return *T - /// For [*]T, returns *T - /// For []T, returns *T - /// Handles const-ness and address spaces in particular. - pub fn elemPtrType(ptr_ty: Type, arena: Allocator, mod: *Module) !Type { - return try Type.ptr(arena, mod, .{ - .pointee_type = ptr_ty.elemType2(), - .mutable = ptr_ty.ptrIsMutable(), - .@"addrspace" = ptr_ty.ptrAddressSpace(), - }); - } - fn shallowElemType(child_ty: Type) Type { return switch (child_ty.zigTypeTag()) { .Array, .Vector => child_ty.childType(), |
