diff --git a/clang/lib/CIR/Dialect/IR/CIRTypes.cpp b/clang/lib/CIR/Dialect/IR/CIRTypes.cpp index 5897352829891..f7907c76c8ccb 100644 --- a/clang/lib/CIR/Dialect/IR/CIRTypes.cpp +++ b/clang/lib/CIR/Dialect/IR/CIRTypes.cpp @@ -341,7 +341,7 @@ RecordType::getTypeSizeInBits(const mlir::DataLayout &dataLayout, if (isUnion()) return dataLayout.getTypeSize(getLargestMember(dataLayout)); - unsigned recordSize = computeStructSize(dataLayout); + auto recordSize = static_cast(computeStructSize(dataLayout)); return llvm::TypeSize::getFixed(recordSize * 8); }