Skip to content

Commit 6edfd5c

Browse files
authored
[CIR][NFC] Rectify the documentation of convertTypeForMem (#1526)
Fix #1371. Not sure about whether we could remove `convertTypeForMem` completely. Let's fix the doc first.
1 parent cb15d3f commit 6edfd5c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

clang/lib/CIR/CodeGen/CIRGenTypes.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,12 @@ class CIRGenTypes {
182182

183183
const CIRGenRecordLayout &getCIRGenRecordLayout(const clang::RecordDecl *RD);
184184

185-
/// Convert type T into an mlir::Type. This differs from
186-
/// convertType in that it is used to convert to the memory representation
187-
/// for a type. For example, the scalar representation for _Bool is i1, but
188-
/// the memory representation is usually i8 or i32, depending on the target.
189-
/// Note: CIR defers most of the special conversions to the final lowering
190-
/// passes to conserve the high level information.
185+
/// Convert type T into a mlir::Type. This differs from convertType in that it
186+
/// is used to convert to the memory representation for a type. In CIR, we
187+
/// preserve high-level type information (like cir.bool for boolean values)
188+
/// during CIRGen, and let the lowering passes handle the target-specific
189+
/// memory representation later. This approach maintains more semantic
190+
/// information for optimizations and diagnostics until final code generation.
191191
mlir::Type convertTypeForMem(clang::QualType, bool forBitField = false);
192192

193193
/// Get the CIR function type for \arg Info.

0 commit comments

Comments
 (0)