Skip to content

CIRGenTypes::convertTypeForMem and bool #1371

@dkolsen-pgi

Description

@dkolsen-pgi

The documentation for CIRGenTypes::convertTypeForMem states that it treats bool specially:

  /// Convert type T into an mlir::Type. This differs from convertType in that
  /// it is used to convert to the memory representation for a type. For
  /// example, the scalar representation for bool is i1, but the memory
  /// representation is usually i8 or i32, depending on the target.

But the implementation of CIRGenTypes::convertTypeForMem in CIRGenTypes.cpp doesn't check for bool or do anything special for bool.

Either the documentation or the implementation is wrong. I don't know which. One of them needs to be fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions