clang 22.0.0git
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 918 of file LangOptions.h.

Member Typedef Documentation

◆ RoundingMode

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

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

Constructor & Destructor Documentation

◆ FPOptionsOverride() [1/4]

clang::FPOptionsOverride::FPOptionsOverride ( )
inline

Definition at line 936 of file LangOptions.h.

Referenced by getFromOpaqueInt(), operator!=(), and operator==().

◆ FPOptionsOverride() [2/4]

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

Definition at line 937 of file LangOptions.h.

References OverrideMaskBits.

◆ FPOptionsOverride() [3/4]

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

Definition at line 939 of file LangOptions.h.

References OverrideMaskBits.

◆ FPOptionsOverride() [4/4]

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

Definition at line 941 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]

◆ dump()

LLVM_DUMP_METHOD void FPOptionsOverride::dump ( )

Definition at line 239 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()

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.

References FPOptionsOverride().

◆ operator==()

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

Definition at line 999 of file LangOptions.h.

References FPOptionsOverride().

◆ requiresTrailingStorage()

◆ setAllowFPContractAcrossStatement()

void clang::FPOptionsOverride::setAllowFPContractAcrossStatement ( )
inline

◆ setAllowFPContractWithinStatement()

void clang::FPOptionsOverride::setAllowFPContractWithinStatement ( )
inline

◆ setDisallowFPContract()

void clang::FPOptionsOverride::setDisallowFPContract ( )
inline

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

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.
static constexpr unsigned StorageBitSize

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

Definition at line 933 of file LangOptions.h.

Referenced by FPOptionsOverride(), FPOptionsOverride(), and getFromOpaqueInt().


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