Class BitType

All Implemented Interfaces:
ASTLocusTag.ASTLocusTagProvider, TypeComparator.SemanticEqualityOp, Cloneable

public class BitType extends IntType implements Cloneable
Represents a bitfield in a struct.
  • Constructor Details

    • BitType

      public BitType(IntType underlyingType, int sizeInBits, int lsbOffset, int cvAttributes, ASTLocusTag astLocus)
  • Method Details

    • hashCodeImpl

      protected int hashCodeImpl()
      Overrides:
      hashCodeImpl in class IntType
    • equalsImpl

      protected boolean equalsImpl(Type arg)
      Overrides:
      equalsImpl in class IntType
    • hashCodeSemanticsImpl

      protected int hashCodeSemanticsImpl()
      Overrides:
      hashCodeSemanticsImpl in class IntType
    • equalSemanticsImpl

      protected boolean equalSemanticsImpl(Type arg)
      Overrides:
      equalSemanticsImpl in class IntType
    • asBit

      public BitType asBit()
      Description copied from class: Type
      Casts this to a BitType or returns null if not a BitType.
      Overrides:
      asBit in class Type
    • getSizeInBits

      public int getSizeInBits()
      Size in bits of this type.
    • getOffset

      public int getOffset()
      Offset from the least-significant bit (LSB) of the LSB of this type
    • visit

      public void visit(TypeVisitor arg)
      Description copied from class: Type
      Traverse this Type and all of its component types; for example, the return type and argument types of a FunctionType.
      Overrides:
      visit in class Type