Skip to content

Commit f39c289

Browse files
committed
1 parent bad4460 commit f39c289

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/CIR/CodeGen/CIRGenTypes.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,8 @@ mlir::Type CIRGenTypes::convertType(QualType type) {
424424
// TODO(cir): Implement updateCompletedType for enums.
425425
assert(!cir.MissingFeatures::updateCompletedType());
426426
const EnumDecl *ED = cast<EnumType>(ty)->getDecl();
427-
if (ED->isCompleteDefinition() || ED->isFixed())
428-
return convertType(ED->getIntegerType());
427+
if (auto integerType = ED->getIntegerType(); !integerType.isNull())
428+
return convertType(integerType);
429429
// Return a placeholder 'i32' type. This can be changed later when the
430430
// type is defined (see UpdateCompletedType), but is likely to be the
431431
// "right" answer.

0 commit comments

Comments
 (0)