Skip to content

Commit 294a182

Browse files
authored
[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.
1 parent 2112379 commit 294a182

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

clang/lib/CIR/CodeGen/CIRGenFunction.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ cir::TypeEvaluationKind CIRGenFunction::getEvaluationKind(QualType type) {
4242
#include "clang/AST/TypeNodes.inc"
4343
llvm_unreachable("non-canonical or dependent type in IR-generation");
4444

45-
case Type::ArrayParameter:
46-
case Type::HLSLAttributedResource:
47-
llvm_unreachable("NYI");
48-
4945
case Type::Auto:
5046
case Type::DeducedTemplateSpecialization:
5147
llvm_unreachable("undeduced type in IR-generation");
@@ -66,6 +62,8 @@ cir::TypeEvaluationKind CIRGenFunction::getEvaluationKind(QualType type) {
6662
case Type::ObjCObjectPointer:
6763
case Type::Pipe:
6864
case Type::BitInt:
65+
case Type::HLSLAttributedResource:
66+
case Type::HLSLInlineSpirv:
6967
return cir::TEK_Scalar;
7068

7169
// Complexes.
@@ -79,6 +77,7 @@ cir::TypeEvaluationKind CIRGenFunction::getEvaluationKind(QualType type) {
7977
case Type::Record:
8078
case Type::ObjCObject:
8179
case Type::ObjCInterface:
80+
case Type::ArrayParameter:
8281
return cir::TEK_Aggregate;
8382

8483
// We operate on atomic values according to their underlying type.

0 commit comments

Comments
 (0)