sun::types::RawPointerType

sun::types::RawPointerType

class · Source (opens in a new tab)

class sun::types::RawPointerType : public sun::types::Type

Raw pointer type - non-owning pointer for C interop (no automatic cleanup) Type annotation: raw_ptr<T> where T is the pointee type Examples: raw_ptr<i8> = char*, raw_ptr<raw_ptr<i8>> = char** for argv.

Inherits

Public Functions

RawPointerType

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

sun::types::RawPointerType::RawPointerType(TypePtr pointee)

Creates a non-owning raw pointer type for the supplied pointee type.

Related: TypePtr

equals

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

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

Defined out-of-line below (needs StaticPointerType to be complete).

Related: Type, StaticPointerType

getKind

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

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

Returns the type category used for semantic checks and dispatch.

Related: Kind

getPointeeLLVMType

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

llvm::Type * sun::types::RawPointerType::getPointeeLLVMType(llvm::LLVMContext &ctx) const

Get the LLVM type of the pointee (for load/store operations).

getPointeeType

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

const TypePtr & sun::types::RawPointerType::getPointeeType() const

Returns the pointee type stored by this object.

Related: TypePtr

toDisplayString

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

std::string sun::types::RawPointerType::toDisplayString() const override

Returns a source-facing type name without internal compiler prefixes.

toLLVMType

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

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

Returns opaque pointer in modern LLVM (all pointers are ptr).

toString

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

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

Returns a readable representation for diagnostics and debugging.

Public Fields

StaticKind

public · variable · static · Source (opens in a new tab)

Kind sun::types::RawPointerType::StaticKind = Kind::RawPointer

No documentation comment.

Related: Kind, Kind::RawPointer

Private Fields

pointeeType

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

TypePtr sun::types::RawPointerType::pointeeType

No documentation comment.

Related: TypePtr