clang 20.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 978 of file LangOptions.h.

Member Typedef Documentation

◆ RoundingMode

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

Definition at line 983 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 987 of file LangOptions.h.

Constructor & Destructor Documentation

◆ FPOptionsOverride() [1/4]

clang::FPOptionsOverride::FPOptionsOverride ( )
inline

Definition at line 996 of file LangOptions.h.

◆ FPOptionsOverride() [2/4]

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

Definition at line 997 of file LangOptions.h.

◆ FPOptionsOverride() [3/4]

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

Definition at line 999 of file LangOptions.h.

◆ FPOptionsOverride() [4/4]

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

Definition at line 1001 of file LangOptions.h.

Member Function Documentation

◆ applyOverrides() [1/2]

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

Definition at line 1055 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 234 of file LangOptions.cpp.

◆ getAsOpaqueInt()

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

Definition at line 1036 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 1062 of file LangOptions.h.

◆ operator==()

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

Definition at line 1059 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

Definition at line 1014 of file LangOptions.h.

References clang::LangOptionsBase::FPM_Off.

Referenced by clang::Sema::ActOnPragmaFPContract().

◆ 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:987
static constexpr unsigned StorageBitSize
Definition: LangOptions.h:833

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

Definition at line 993 of file LangOptions.h.

Referenced by getFromOpaqueInt().


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