clang 20.0.0git
Classes | Namespaces | Macros | Enumerations
LangOptions.h File Reference

Defines the clang::LangOptions interface. More...

#include "clang/Basic/CommentOptions.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/LangStandard.h"
#include "clang/Basic/ObjCRuntime.h"
#include "clang/Basic/Sanitizers.h"
#include "clang/Basic/TargetCXXABI.h"
#include "clang/Basic/Visibility.h"
#include "llvm/ADT/FloatingPointMode.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/TargetParser/Triple.h"
#include <optional>
#include <string>
#include <vector>
#include "clang/Basic/LangOptions.def"
#include "clang/Basic/FPOptions.def"

Go to the source code of this file.

Classes

class  clang::LangOptionsBase
 Bitfields of LangOptions, split out from LangOptions in order to ensure that this large collection of bitfields is a trivial class type. More...
 
class  clang::LangOptions
 Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that is accepted. More...
 
class  clang::FPOptions
 
class  clang::FPOptionsOverride
 Represents difference between two FPOptions values. More...
 

Namespaces

namespace  clang
 The JSON file list parser is used to communicate input to InstallAPI.
 

Macros

#define LANGOPT(Name, Bits, Default, Description)   unsigned Name : Bits;
 
#define ENUM_LANGOPT(Name, Type, Bits, Default, Description)
 
#define LANGOPT(Name, Bits, Default, Description)
 
#define ENUM_LANGOPT(Name, Type, Bits, Default, Description)
 
#define LANGOPT(Name, Bits, Default, Description)
 
#define ENUM_LANGOPT(Name, Type, Bits, Default, Description)
 
#define OPTION(NAME, TYPE, WIDTH, PREVIOUS)
 
#define OPTION(NAME, TYPE, WIDTH, PREVIOUS)   +WIDTH
 
#define OPTION(NAME, TYPE, WIDTH, PREVIOUS)
 
#define OPTION(NAME, TYPE, WIDTH, PREVIOUS)
 

Enumerations

enum class  clang::MSVtorDispMode { clang::Never , clang::ForVBaseOverride , clang::ForVFTable }
 In the Microsoft ABI, this controls the placement of virtual displacement members used to implement virtual inheritance. More...
 
enum class  clang::ShaderStage {
  clang::Pixel = 0 , clang::Vertex , clang::Geometry , clang::Hull ,
  clang::Domain , clang::Compute , clang::Library , clang::RayGeneration ,
  clang::Intersection , clang::AnyHit , clang::ClosestHit , clang::Miss ,
  clang::Callable , clang::Mesh , clang::Amplification , clang::Invalid
}
 Shader programs run in specific pipeline stages. More...
 
enum class  clang::PointerAuthenticationMode : unsigned { clang::None , clang::Strip , clang::SignAndStrip , clang::SignAndAuth }
 
enum  clang::TranslationUnitKind { clang::TU_Complete , clang::TU_Prefix , clang::TU_ClangModule , clang::TU_Incremental }
 Describes the kind of translation unit being processed. More...
 

Detailed Description

Defines the clang::LangOptions interface.

Definition in file LangOptions.h.

Macro Definition Documentation

◆ ENUM_LANGOPT [1/3]

#define ENUM_LANGOPT (   Name,
  Type,
  Bits,
  Default,
  Description 
)

Definition at line 620 of file LangOptions.h.

◆ ENUM_LANGOPT [2/3]

#define ENUM_LANGOPT (   Name,
  Type,
  Bits,
  Default,
  Description 
)
Value:
LLVM_PREFERRED_TYPE(Type) \
unsigned Name : Bits;
MatchType Type

Definition at line 620 of file LangOptions.h.

◆ ENUM_LANGOPT [3/3]

#define ENUM_LANGOPT (   Name,
  Type,
  Bits,
  Default,
  Description 
)
Value:
Type get##Name() const { return static_cast<Type>(Name); } \
void set##Name(Type Value) { Name = static_cast<unsigned>(Value); }

Definition at line 620 of file LangOptions.h.

◆ LANGOPT [1/3]

#define LANGOPT (   Name,
  Bits,
  Default,
  Description 
)    unsigned Name : Bits;

Definition at line 619 of file LangOptions.h.

◆ LANGOPT [2/3]

#define LANGOPT (   Name,
  Bits,
  Default,
  Description 
)

Definition at line 619 of file LangOptions.h.

◆ LANGOPT [3/3]

#define LANGOPT (   Name,
  Bits,
  Default,
  Description 
)

Definition at line 619 of file LangOptions.h.

◆ OPTION [1/4]

#define OPTION (   NAME,
  TYPE,
  WIDTH,
  PREVIOUS 
)
Value:
static constexpr storage_type NAME##Shift = \
PREVIOUS##Shift + PREVIOUS##Width; \
static constexpr storage_type NAME##Width = WIDTH; \
static constexpr storage_type NAME##Mask = ((1 << NAME##Width) - 1) \
<< NAME##Shift;

Definition at line 1033 of file LangOptions.h.

◆ OPTION [2/4]

#define OPTION (   NAME,
  TYPE,
  WIDTH,
  PREVIOUS 
)    +WIDTH

Definition at line 1033 of file LangOptions.h.

◆ OPTION [3/4]

#define OPTION (   NAME,
  TYPE,
  WIDTH,
  PREVIOUS 
)
Value:
TYPE get##NAME() const { \
return static_cast<TYPE>((Value & NAME##Mask) >> NAME##Shift); \
} \
void set##NAME(TYPE value) { \
Value = (Value & ~NAME##Mask) | (storage_type(value) << NAME##Shift); \
}
#define TYPE(DERIVED, BASE)
Definition: ASTFwd.h:26

Definition at line 1033 of file LangOptions.h.

◆ OPTION [4/4]

#define OPTION (   NAME,
  TYPE,
  WIDTH,
  PREVIOUS 
)
Value:
bool has##NAME##Override() const { \
return OverrideMask & FPOptions::NAME##Mask; \
} \
TYPE get##NAME##Override() const { \
assert(has##NAME##Override()); \
return Options.get##NAME(); \
} \
void clear##NAME##Override() { \
/* Clear the actual value so that we don't have spurious differences when \
* testing equality. */ \
Options.set##NAME(TYPE(0)); \
OverrideMask &= ~FPOptions::NAME##Mask; \
} \
void set##NAME##Override(TYPE value) { \
Options.set##NAME(value); \
OverrideMask |= FPOptions::NAME##Mask; \
}

Definition at line 1033 of file LangOptions.h.