clang  12.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"

Collaboration diagram for clang::FPOptionsOverride:
Collaboration graph
[legend]

Public Types

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

Public Member Functions

 FPOptionsOverride ()
 
 FPOptionsOverride (const LangOptions &LO)
 
 FPOptionsOverride (FPOptions FPO)
 
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. More...
 

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 507 of file LangOptions.h.

Member Typedef Documentation

◆ RoundingMode

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

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

Constructor & Destructor Documentation

◆ FPOptionsOverride() [1/3]

clang::FPOptionsOverride::FPOptionsOverride ( )
inline

Definition at line 525 of file LangOptions.h.

◆ FPOptionsOverride() [2/3]

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

Definition at line 526 of file LangOptions.h.

◆ FPOptionsOverride() [3/3]

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

Definition at line 528 of file LangOptions.h.

Member Function Documentation

◆ applyOverrides() [1/2]

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

◆ applyOverrides() [2/2]

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

Definition at line 579 of file LangOptions.h.

References applyOverrides().

◆ dump()

LLVM_DUMP_METHOD void FPOptionsOverride::dump ( )

Definition at line 63 of file LangOptions.cpp.

◆ getAsOpaqueInt()

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

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

◆ operator==()

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

Definition at line 583 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 533 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 541 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
static
Initial value:
=
(static_cast<storage_type>(1) << FPOptions::StorageBitSize) - 1

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

Definition at line 522 of file LangOptions.h.

Referenced by getFromOpaqueInt().


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