sun::types::RawPointerType
class · Source (opens in a new tab)
class sun::types::RawPointerType : public sun::types::TypeRaw 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
- sun::types::Type (public)
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 overrideDefined 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 overrideReturns 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) constGet 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() constReturns 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 overrideReturns 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 overrideReturns 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 overrideReturns 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::RawPointerNo documentation comment.
Related: Kind, Kind::RawPointer
Private Fields
pointeeType
private · variable · Source (opens in a new tab)
TypePtr sun::types::RawPointerType::pointeeTypeNo documentation comment.
Related: TypePtr