Skip to content

Commit bf47cb4

Browse files
committed
std.Target: Fix C type alignment calculation for spirv.
1 parent 1b6b881 commit bf47cb4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/std/Target.zig

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2400,9 +2400,6 @@ pub fn c_type_alignment(target: Target, c_type: CType) u16 {
24002400
.nvptx,
24012401
.nvptx64,
24022402
.s390x,
2403-
.spirv,
2404-
.spirv32,
2405-
.spirv64,
24062403
=> 8,
24072404

24082405
.aarch64,
@@ -2417,6 +2414,9 @@ pub fn c_type_alignment(target: Target, c_type: CType) u16 {
24172414
.riscv32,
24182415
.riscv64,
24192416
.sparc64,
2417+
.spirv,
2418+
.spirv32,
2419+
.spirv64,
24202420
.x86_64,
24212421
.ve,
24222422
.wasm32,
@@ -2511,9 +2511,6 @@ pub fn c_type_preferred_alignment(target: Target, c_type: CType) u16 {
25112511
.nvptx,
25122512
.nvptx64,
25132513
.s390x,
2514-
.spirv,
2515-
.spirv32,
2516-
.spirv64,
25172514
=> 8,
25182515

25192516
.aarch64,
@@ -2528,6 +2525,9 @@ pub fn c_type_preferred_alignment(target: Target, c_type: CType) u16 {
25282525
.riscv32,
25292526
.riscv64,
25302527
.sparc64,
2528+
.spirv,
2529+
.spirv32,
2530+
.spirv64,
25312531
.x86_64,
25322532
.ve,
25332533
.wasm32,

0 commit comments

Comments
 (0)