[clang] cd1ad5a - [CIR] Add missing switch cases for AO__scoped_atomic_uinc/udec_wrap in emitAtomicOp (#169610)

via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 26 06:26:04 PST 2025


Author: Wenju He
Date: 2025-11-26T06:25:59-08:00
New Revision: cd1ad5a9e08800043f03f73348b56372a983afa2

URL: https://github.com/llvm/llvm-project/commit/cd1ad5a9e08800043f03f73348b56372a983afa2
DIFF: https://github.com/llvm/llvm-project/commit/cd1ad5a9e08800043f03f73348b56372a983afa2.diff

LOG: [CIR] Add missing switch cases for AO__scoped_atomic_uinc/udec_wrap in emitAtomicOp (#169610)

Fix build error: enumeration values 'AO__scoped_atomic_udec_wrap' and
'AO__scoped_atomic_uinc_wrap' not handled in switch [-Werror,-Wswitch]
The two builtins were added in 5d38cddc3b00.

Added: 
    

Modified: 
    clang/lib/CIR/CodeGen/CIRGenAtomic.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CIR/CodeGen/CIRGenAtomic.cpp b/clang/lib/CIR/CodeGen/CIRGenAtomic.cpp
index 48c082d89de18..4c94db5ddd457 100644
--- a/clang/lib/CIR/CodeGen/CIRGenAtomic.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenAtomic.cpp
@@ -644,6 +644,9 @@ static void emitAtomicOp(CIRGenFunction &cgf, AtomicExpr *expr, Address dest,
   case AtomicExpr::AO__scoped_atomic_nand_fetch:
 
   case AtomicExpr::AO__scoped_atomic_fetch_nand:
+
+  case AtomicExpr::AO__scoped_atomic_uinc_wrap:
+  case AtomicExpr::AO__scoped_atomic_udec_wrap:
     cgf.cgm.errorNYI(expr->getSourceRange(), "emitAtomicOp: expr op NYI");
     return;
   }


        


More information about the cfe-commits mailing list