diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Sema.zig | 2 | ||||
| -rw-r--r-- | src/target.zig | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/Sema.zig b/src/Sema.zig index 725c9d00e5..209d012b24 100644 --- a/src/Sema.zig +++ b/src/Sema.zig @@ -36508,7 +36508,7 @@ pub fn analyzeAsAddressSpace( const address_space = try sema.interpretBuiltinType(block, src, addrspace_val, std.builtin.AddressSpace); const target = pt.zcu.getTarget(); - if (!target.cpu.supportsAddressSpace(address_space, ctx)) { + if (!target.supportsAddressSpace(address_space, ctx)) { // TODO error messages could be made more elaborate here const entity = switch (ctx) { .function => "functions", diff --git a/src/target.zig b/src/target.zig index 12af14de9d..3a1b9f93af 100644 --- a/src/target.zig +++ b/src/target.zig @@ -539,10 +539,10 @@ pub fn addrSpaceCastIsValid( to: AddressSpace, ) bool { switch (target.cpu.arch) { - .x86_64, .x86 => return target.cpu.supportsAddressSpace(from, null) and target.cpu.supportsAddressSpace(to, null), + .x86_64, .x86 => return target.supportsAddressSpace(from, null) and target.supportsAddressSpace(to, null), .nvptx64, .nvptx, .amdgcn => { - const to_generic = target.cpu.supportsAddressSpace(from, null) and to == .generic; - const from_generic = target.cpu.supportsAddressSpace(to, null) and from == .generic; + const to_generic = target.supportsAddressSpace(from, null) and to == .generic; + const from_generic = target.supportsAddressSpace(to, null) and from == .generic; return to_generic or from_generic; }, else => return from == .generic and to == .generic, |
