clang 18.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)
 
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 829 of file LangOptions.h.

Member Typedef Documentation

◆ RoundingMode

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

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

Constructor & Destructor Documentation

◆ FPOptionsOverride() [1/4]

clang::FPOptionsOverride::FPOptionsOverride ( )
inline

Definition at line 847 of file LangOptions.h.

◆ FPOptionsOverride() [2/4]

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

Definition at line 848 of file LangOptions.h.

◆ FPOptionsOverride() [3/4]

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

Definition at line 850 of file LangOptions.h.

◆ FPOptionsOverride() [4/4]

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

Definition at line 852 of file LangOptions.h.

Member Function Documentation

◆ applyOverrides() [1/2]

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

Definition at line 904 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 885 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 911 of file LangOptions.h.

◆ operator==()

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

Definition at line 908 of file LangOptions.h.

◆ requiresTrailingStorage()

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

◆ setAllowFPContractAcrossStatement()

void clang::FPOptionsOverride::setAllowFPContractAcrossStatement ( )
inline

◆ setAllowFPContractWithinStatement()

void clang::FPOptionsOverride::setAllowFPContractWithinStatement ( )
inline

Definition at line 857 of file LangOptions.h.

References clang::LangOptions::FPM_On.

Referenced by clang::Sema::ActOnPragmaFPContract(), and setFPPreciseEnabled().

◆ setDisallowFPContract()

void clang::FPOptionsOverride::setDisallowFPContract ( )
inline

Definition at line 865 of file LangOptions.h.

References clang::LangOptions::FPM_Off.

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

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

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

Definition at line 844 of file LangOptions.h.

Referenced by getFromOpaqueInt().


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