diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2025-01-24 02:04:51 +0100 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2025-02-17 19:17:56 +0100 |
| commit | ce8c61b0fcb7e0610d4b39728b2d73ed10e762f6 (patch) | |
| tree | 205013fb60c2e44f153d3b5648fffd50636cc7ed /src/Sema.zig | |
| parent | 00481668671a8719627922a05a1c143f9d0409ed (diff) | |
| download | zig-ce8c61b0fcb7e0610d4b39728b2d73ed10e762f6.tar.gz zig-ce8c61b0fcb7e0610d4b39728b2d73ed10e762f6.zip | |
std.Target: Move Cpu.Arch.supportsAddressSpace() up to Cpu.
This allows it to inspect CPU features which is needed for Propeller, and AVR in
the future.
Diffstat (limited to 'src/Sema.zig')
| -rw-r--r-- | src/Sema.zig | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Sema.zig b/src/Sema.zig index 1fbec0ecc4..78a7a8f658 100644 --- a/src/Sema.zig +++ b/src/Sema.zig @@ -37244,9 +37244,8 @@ pub fn analyzeAsAddressSpace( const addrspace_val = try sema.resolveConstDefinedValue(block, src, coerced, .{ .simple = .@"addrspace" }); const address_space = try sema.interpretBuiltinType(block, src, addrspace_val, std.builtin.AddressSpace); const target = pt.zcu.getTarget(); - const arch = target.cpu.arch; - if (!arch.supportsAddressSpace(address_space, ctx)) { + if (!target.cpu.supportsAddressSpace(address_space, ctx)) { // TODO error messages could be made more elaborate here const entity = switch (ctx) { .function => "functions", @@ -37258,7 +37257,7 @@ pub fn analyzeAsAddressSpace( block, src, "{s} with address space '{s}' are not supported on {s}", - .{ entity, @tagName(address_space), arch.genericName() }, + .{ entity, @tagName(address_space), target.cpu.arch.genericName() }, ); } |
