https://github.com/skc7 updated https://github.com/llvm/llvm-project/pull/182469
>From e59bdae490c40e9d915aca885601d6efb756f758 Mon Sep 17 00:00:00 2001 From: skc7 <[email protected]> Date: Fri, 20 Feb 2026 15:58:34 +0530 Subject: [PATCH] [CIR] Handle Type::OverflowBehavior in CIR CodeGen Add handling for the newly introduced Type::OverflowBehavior type class in CIRGenItaniumCXXABI.cpp and CIRGenFunction.cpp switch statements to fix -Werror,-Wswitch compilation errors. --- clang/lib/CIR/CodeGen/CIRGenFunction.cpp | 2 ++ clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/clang/lib/CIR/CodeGen/CIRGenFunction.cpp b/clang/lib/CIR/CodeGen/CIRGenFunction.cpp index f8f674c4d2c21..71f3368cca3bb 100644 --- a/clang/lib/CIR/CodeGen/CIRGenFunction.cpp +++ b/clang/lib/CIR/CodeGen/CIRGenFunction.cpp @@ -67,6 +67,7 @@ cir::TypeEvaluationKind CIRGenFunction::getEvaluationKind(QualType type) { case Type::ObjCObjectPointer: case Type::Pipe: case Type::BitInt: + case Type::OverflowBehavior: case Type::HLSLAttributedResource: case Type::HLSLInlineSpirv: return cir::TEK_Scalar; @@ -1372,6 +1373,7 @@ void CIRGenFunction::emitVariablyModifiedType(QualType type) { case Type::ObjCInterface: case Type::ObjCObjectPointer: case Type::BitInt: + case Type::OverflowBehavior: llvm_unreachable("type class is never variably-modified!"); case Type::Adjusted: diff --git a/clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp b/clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp index aca2278c3876c..a4fdf8b33216b 100644 --- a/clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp +++ b/clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp @@ -960,6 +960,7 @@ const char *vTableClassNameForType(const CIRGenModule &cgm, const Type *ty) { case Type::Builtin: case Type::BitInt: + case Type::OverflowBehavior: // GCC treats vector and complex types as fundamental types. case Type::Vector: case Type::ExtVector: @@ -1388,6 +1389,9 @@ mlir::Attribute CIRGenItaniumRTTIBuilder::buildTypeInfo( case Type::BitInt: break; + case Type::OverflowBehavior: + break; + case Type::ConstantArray: case Type::IncompleteArray: case Type::VariableArray: _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
