LLVM 24.0.0git
llvm::FloatRepr Class Reference

Interface for fltSemantics callbacks to access the internal data of APFloat/IEEEFloat. More...

#include "llvm/ADT/APFloat.h"

Public Member Functions

LLVM_ABI void initialize (const fltSemantics &Sem)
 Set the semantics and allocate storage for the significand.
LLVM_ABI const fltSemantics & getSemantics () const
LLVM_ABI APFloatBase::fltCategory getCategory () const
LLVM_ABI void setCategory (APFloatBase::fltCategory Category)
 Exponent and significand are only meaningful for fcNormal and fcNaN.
LLVM_ABI bool isNegative () const
LLVM_ABI void setNegative (bool Negative)
LLVM_ABI APFloatBase::ExponentType getExponent () const
LLVM_ABI void setExponent (APFloatBase::ExponentType Exponent)
LLVM_ABI APInt getSignificand () const
LLVM_ABI void setSignificand (const APInt &Significand)
 The significand is precision bits wide and includes the integer bit.

Friends

class detail::IEEEFloat

Detailed Description

Interface for fltSemantics callbacks to access the internal data of APFloat/IEEEFloat.

Used to let user provided callback functions in fltSemantics access the internals of APFloat without making them public and to hide the concrete class used in APFloat

Definition at line 1018 of file APFloat.h.

Member Function Documentation

◆ getCategory()

APFloatBase::fltCategory llvm::FloatRepr::getCategory ( ) const

Definition at line 5957 of file APFloat.cpp.

◆ getExponent()

APFloatBase::ExponentType llvm::FloatRepr::getExponent ( ) const

Definition at line 5963 of file APFloat.cpp.

◆ getSemantics()

const fltSemantics & llvm::FloatRepr::getSemantics ( ) const

Definition at line 5955 of file APFloat.cpp.

◆ getSignificand()

APInt llvm::FloatRepr::getSignificand ( ) const

Definition at line 5967 of file APFloat.cpp.

◆ initialize()

void llvm::FloatRepr::initialize ( const fltSemantics & Sem)

Set the semantics and allocate storage for the significand.

Must be called exactly once before any setter when initializing from bits.

Definition at line 5953 of file APFloat.cpp.

◆ isNegative()

bool llvm::FloatRepr::isNegative ( ) const

Definition at line 5961 of file APFloat.cpp.

◆ setCategory()

void llvm::FloatRepr::setCategory ( APFloatBase::fltCategory Category)

Exponent and significand are only meaningful for fcNormal and fcNaN.

Definition at line 5972 of file APFloat.cpp.

◆ setExponent()

void llvm::FloatRepr::setExponent ( APFloatBase::ExponentType Exponent)
  • The exponent is unbiased. Denormals use the semantics' minExponent and have the integer bit cleared.

Definition at line 5982 of file APFloat.cpp.

References llvm::Exponent.

◆ setNegative()

void llvm::FloatRepr::setNegative ( bool Negative)

Definition at line 5976 of file APFloat.cpp.

References assert().

◆ setSignificand()

void llvm::FloatRepr::setSignificand ( const APInt & Significand)

The significand is precision bits wide and includes the integer bit.

Definition at line 5986 of file APFloat.cpp.

References assert(), llvm::APInt::getBitWidth(), llvm::APInt::getNumWords(), llvm::APInt::getRawData(), and llvm::APInt::tcSet().

◆ detail::IEEEFloat

friend class detail::IEEEFloat
friend

Definition at line 1021 of file APFloat.h.

References F.


The documentation for this class was generated from the following files: