From 6067d39522f939c08dd3f3ea4fb5889ff0024e72 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Sun, 18 Feb 2024 21:52:23 -0800 Subject: std.builtin: make atomic order fields lowercase --- src/codegen/c.zig | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/codegen/c.zig') diff --git a/src/codegen/c.zig b/src/codegen/c.zig index 5b317e2889..8d630480e2 100644 --- a/src/codegen/c.zig +++ b/src/codegen/c.zig @@ -3278,10 +3278,10 @@ fn genBodyInner(f: *Function, body: []const Air.Inst.Index) error{ AnalysisFail, .int_from_ptr => try airIntFromPtr(f, inst), - .atomic_store_unordered => try airAtomicStore(f, inst, toMemoryOrder(.Unordered)), - .atomic_store_monotonic => try airAtomicStore(f, inst, toMemoryOrder(.Monotonic)), - .atomic_store_release => try airAtomicStore(f, inst, toMemoryOrder(.Release)), - .atomic_store_seq_cst => try airAtomicStore(f, inst, toMemoryOrder(.SeqCst)), + .atomic_store_unordered => try airAtomicStore(f, inst, toMemoryOrder(.unordered)), + .atomic_store_monotonic => try airAtomicStore(f, inst, toMemoryOrder(.monotonic)), + .atomic_store_release => try airAtomicStore(f, inst, toMemoryOrder(.release)), + .atomic_store_seq_cst => try airAtomicStore(f, inst, toMemoryOrder(.seq_cst)), .struct_field_ptr_index_0 => try airStructFieldPtrIndex(f, inst, 0), .struct_field_ptr_index_1 => try airStructFieldPtrIndex(f, inst, 1), @@ -7482,11 +7482,11 @@ fn airCVaCopy(f: *Function, inst: Air.Inst.Index) !CValue { fn toMemoryOrder(order: std.builtin.AtomicOrder) [:0]const u8 { return switch (order) { // Note: unordered is actually even less atomic than relaxed - .Unordered, .Monotonic => "zig_memory_order_relaxed", - .Acquire => "zig_memory_order_acquire", - .Release => "zig_memory_order_release", - .AcqRel => "zig_memory_order_acq_rel", - .SeqCst => "zig_memory_order_seq_cst", + .unordered, .monotonic => "zig_memory_order_relaxed", + .acquire => "zig_memory_order_acquire", + .release => "zig_memory_order_release", + .acq_rel => "zig_memory_order_acq_rel", + .seq_cst => "zig_memory_order_seq_cst", }; } -- cgit v1.2.3