clang 19.0.0git
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
clang::FPOptionsOverride Class Reference

Represents difference between two FPOptions values. More...

#include "clang/Basic/LangOptions.h"

Public Types

using RoundingMode = llvm::RoundingMode
 
using storage_type = uint64_t
 The type suitable for storing values of FPOptionsOverride.
 

Public Member Functions

 FPOptionsOverride ()
 
 FPOptionsOverride (const LangOptions &LO)
 
 FPOptionsOverride (FPOptions FPO)
 
 FPOptionsOverride (FPOptions FPO, FPOptions::storage_type Mask)
 
bool requiresTrailingStorage () const
 
void setAllowFPContractWithinStatement ()
 
void setAllowFPContractAcrossStatement ()
 
void setDisallowFPContract ()
 
void setFPPreciseEnabled (bool Value)
 
void setDisallowOptimizations ()
 
storage_type getAsOpaqueInt () const
 
FPOptions applyOverrides (FPOptions Base)
 
FPOptions applyOverrides (const LangOptions &LO)
 
bool operator== (FPOptionsOverride other) const
 
bool operator!= (FPOptionsOverride other) const
 
LLVM_DUMP_METHOD void dump ()
 

Static Public Member Functions

static FPOptionsOverride getFromOpaqueInt (storage_type I)
 

Static Public Attributes

static constexpr storage_type OverrideMaskBits
 Bit mask selecting bits of OverrideMask in serialized representation of FPOptionsOverride.
 

Detailed Description

Represents difference between two FPOptions values.

The effect of language constructs changing the set of floating point options is usually a change of some FP properties while leaving others intact. This class describes such changes by keeping information about what FP options are overridden.

The integral set of FP options, described by the class FPOptions, may be represented as a default FP option set, defined by language standard and command line options, with the overrides introduced by pragmas.

The is implemented as a value of the new FPOptions plus a mask showing which fields are actually set in it.

Definition at line 915 of file LangOptions.h.

Member Typedef Documentation

◆ RoundingMode

using clang::FPOptionsOverride::RoundingMode = llvm::RoundingMode

Definition at line 920 of file LangOptions.h.

◆ storage_type

The type suitable for storing values of FPOptionsOverride.

Must be twice as wide as bit size of FPOption.

Definition at line 924 of file LangOptions.h.

Constructor & Destructor Documentation

◆ FPOptionsOverride() [1/4]

clang::FPOptionsOverride::FPOptionsOverride ( )
inline

Definition at line 933 of file LangOptions.h.

◆ FPOptionsOverride() [2/4]

clang::FPOptionsOverride::FPOptionsOverride ( const LangOptions LO)
inline

Definition at line 934 of file LangOptions.h.

◆ FPOptionsOverride() [3/4]

clang::FPOptionsOverride::FPOptionsOverride ( FPOptions  FPO)
inline

Definition at line 936 of file LangOptions.h.

◆ FPOptionsOverride() [4/4]

clang::FPOptionsOverride::FPOptionsOverride ( FPOptions  FPO,
FPOptions::storage_type  Mask 
)
inline

Definition at line 938 of file LangOptions.h.

Member Function Documentation

◆ applyOverrides() [1/2]

FPOptions clang::FPOptionsOverride::applyOverrides ( const LangOptions LO)
inline

Definition at line 995 of file LangOptions.h.

References applyOverrides().

◆ applyOverrides() [2/2]

FPOptions clang::FPOptionsOverride::applyOverrides ( FPOptions  Base)
inline

◆ dump()

LLVM_DUMP_METHOD void FPOptionsOverride::dump ( )

Definition at line 232 of file LangOptions.cpp.

◆ getAsOpaqueInt()

storage_type clang::FPOptionsOverride::getAsOpaqueInt ( ) const
inline

Definition at line 976 of file LangOptions.h.

References clang::FPOptions::StorageBitSize.

◆ getFromOpaqueInt()

static FPOptionsOverride clang::FPOptionsOverride::getFromOpaqueInt ( storage_type  I)
inlinestatic

◆ operator!=()

bool clang::FPOptionsOverride::operator!= ( FPOptionsOverride  other) const
inline

Definition at line 1002 of file LangOptions.h.

◆ operator==()

bool clang::FPOptionsOverride::operator== ( FPOptionsOverride  other) const
inline

Definition at line 999 of file LangOptions.h.

◆ requiresTrailingStorage()

bool clang::FPOptionsOverride::requiresTrailingStorage ( ) const
inline

◆ setAllowFPContractAcrossStatement()

void clang::FPOptionsOverride::setAllowFPContractAcrossStatement ( )
inline

◆ setAllowFPContractWithinStatement()

void clang::FPOptionsOverride::setAllowFPContractWithinStatement ( )
inline

◆ setDisallowFPContract()

void clang::FPOptionsOverride::setDisallowFPContract ( )
inline

◆ setDisallowOptimizations()

void clang::FPOptionsOverride::setDisallowOptimizations ( )
inline

◆ setFPPreciseEnabled()

void clang::FPOptionsOverride::setFPPreciseEnabled ( bool  Value)
inline

Member Data Documentation

◆ OverrideMaskBits

constexpr storage_type clang::FPOptionsOverride::OverrideMaskBits
staticconstexpr
Initial value:
=
(static_cast<storage_type>(1) << FPOptions::StorageBitSize) - 1
uint64_t storage_type
The type suitable for storing values of FPOptionsOverride.
Definition: LangOptions.h:924
static constexpr unsigned StorageBitSize
Definition: LangOptions.h:770

Bit mask selecting bits of OverrideMask in serialized representation of FPOptionsOverride.

Definition at line 930 of file LangOptions.h.

Referenced by getFromOpaqueInt().


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