[clang] 294a182 - [CIR][NFC] Fix warning about unhandled type (#142059)
via cfe-commits
cfe-commits at lists.llvm.org
Fri May 30 10:26:31 PDT 2025
Author: Andy Kaylor
Date: 2025-05-30T10:26:28-07:00
New Revision: 294a182021c6a9f93e1eebd173abb7fb6d840fc5
URL: https://github.com/llvm/llvm-project/commit/294a182021c6a9f93e1eebd173abb7fb6d840fc5
DIFF: https://github.com/llvm/llvm-project/commit/294a182021c6a9f93e1eebd173abb7fb6d840fc5.diff
LOG: [CIR][NFC] Fix warning about unhandled type (#142059)
This change fixes a warning about an unhandled type in a switch
statement in CIRGenFunction::getEvaluationKind. It also moves two types
that were marked as NYI to the appropriate group.
Added:
Modified:
clang/lib/CIR/CodeGen/CIRGenFunction.cpp
Removed:
################################################################################
diff --git a/clang/lib/CIR/CodeGen/CIRGenFunction.cpp b/clang/lib/CIR/CodeGen/CIRGenFunction.cpp
index 4335214d77b7d..bd67a3407d749 100644
--- a/clang/lib/CIR/CodeGen/CIRGenFunction.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenFunction.cpp
@@ -42,10 +42,6 @@ cir::TypeEvaluationKind CIRGenFunction::getEvaluationKind(QualType type) {
#include "clang/AST/TypeNodes.inc"
llvm_unreachable("non-canonical or dependent type in IR-generation");
- case Type::ArrayParameter:
- case Type::HLSLAttributedResource:
- llvm_unreachable("NYI");
-
case Type::Auto:
case Type::DeducedTemplateSpecialization:
llvm_unreachable("undeduced type in IR-generation");
@@ -66,6 +62,8 @@ cir::TypeEvaluationKind CIRGenFunction::getEvaluationKind(QualType type) {
case Type::ObjCObjectPointer:
case Type::Pipe:
case Type::BitInt:
+ case Type::HLSLAttributedResource:
+ case Type::HLSLInlineSpirv:
return cir::TEK_Scalar;
// Complexes.
@@ -79,6 +77,7 @@ cir::TypeEvaluationKind CIRGenFunction::getEvaluationKind(QualType type) {
case Type::Record:
case Type::ObjCObject:
case Type::ObjCInterface:
+ case Type::ArrayParameter:
return cir::TEK_Aggregate;
// We operate on atomic values according to their underlying type.
More information about the cfe-commits
mailing list