sun::types::PrimitiveType

sun::types::PrimitiveType

class · Source (opens in a new tab)

class sun::types::PrimitiveType : public sun::types::Type

Primitive types (int, float, bool, etc.).

Inherits

Public Functions

PrimitiveType

public · function · Source (opens in a new tab)

sun::types::PrimitiveType::PrimitiveType(Kind k)

Creates the semantic descriptor for a primitive type category.

Related: Kind

equals

public · function · Source (opens in a new tab)

bool sun::types::PrimitiveType::equals(const Type &other) const override

Reports whether the other type has the same semantic identity.

Related: Type

getKind

public · function · Source (opens in a new tab)

Kind sun::types::PrimitiveType::getKind() const override

Returns the type category used for semantic checks and dispatch.

Related: Kind

toLLVMType

public · function · Source (opens in a new tab)

llvm::Type * sun::types::PrimitiveType::toLLVMType(llvm::LLVMContext &ctx) const override

Returns the LLVM type used to represent values of this semantic type.

toString

public · function · Source (opens in a new tab)

std::string sun::types::PrimitiveType::toString() const override

Returns a readable representation for diagnostics and debugging.

Private Fields

kind

private · variable · Source (opens in a new tab)

Kind sun::types::PrimitiveType::kind

No documentation comment.

Related: Kind