clang 22.0.0git
LangOptions.h File Reference

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

#include "clang/Basic/CFProtectionOptions.h"
#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/BinaryFormat/DXContainer.h"
#include "llvm/TargetParser/Triple.h"
#include <optional>
#include <string>
#include <vector>
#include "clang/Basic/ABIVersions.def"
#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...
struct  clang::AtomicOptions

Namespaces

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

Macros

#define ABI_VER_MAJOR_MINOR(Major, Minor)
#define ABI_VER_MAJOR(Major)
#define ABI_VER_LATEST(Latest)
#define LANGOPT(Name, Bits, Default, Compatibility, Description)
#define ENUM_LANGOPT(Name, Type, Bits, Default, Compatibility, Description)
#define LANGOPT(Name, Bits, Default, Compatibility, Description)
#define ENUM_LANGOPT(Name, Type, Bits, Default, Compatibility, Description)
#define LANGOPT(Name, Bits, Default, Compatibility, Description)
#define ENUM_LANGOPT(Name, Type, Bits, Default, Compatibility, Description)
#define FP_OPTION(NAME, TYPE, WIDTH, PREVIOUS)
#define FP_OPTION(NAME, TYPE, WIDTH, PREVIOUS)
#define FP_OPTION(NAME, TYPE, WIDTH, PREVIOUS)
#define FP_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 class  clang::AtomicOptionKind { clang::RemoteMemory , clang::FineGrainedMemory , clang::IgnoreDenormalMode , clang::LANGOPT_ATOMIC_OPTION_LAST = IgnoreDenormalMode }
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

◆ ABI_VER_LATEST

#define ABI_VER_LATEST ( Latest)
Value:
Latest

Definition at line 191 of file LangOptions.h.

◆ ABI_VER_MAJOR

#define ABI_VER_MAJOR ( Major)
Value:
Ver##Major,

Definition at line 190 of file LangOptions.h.

◆ ABI_VER_MAJOR_MINOR

#define ABI_VER_MAJOR_MINOR ( Major,
Minor )
Value:
Ver##Major##_##Minor,

Definition at line 189 of file LangOptions.h.

◆ ENUM_LANGOPT [1/3]

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

Definition at line 419 of file LangOptions.h.

◆ ENUM_LANGOPT [2/3]

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

Definition at line 419 of file LangOptions.h.

◆ ENUM_LANGOPT [3/3]

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

Definition at line 419 of file LangOptions.h.

◆ FP_OPTION [1/4]

#define FP_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 776 of file LangOptions.h.

◆ FP_OPTION [2/4]

#define FP_OPTION ( NAME,
TYPE,
WIDTH,
PREVIOUS )
Value:
+WIDTH

Definition at line 776 of file LangOptions.h.

◆ FP_OPTION [3/4]

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

Definition at line 776 of file LangOptions.h.

◆ FP_OPTION [4/4]

#define FP_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; \
}
@ Override
Merge availability attributes for an override, which requires an exact match or a weakening of constr...
Definition Sema.h:634

Definition at line 776 of file LangOptions.h.

◆ LANGOPT [1/3]

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

Definition at line 417 of file LangOptions.h.

◆ LANGOPT [2/3]

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

Definition at line 417 of file LangOptions.h.

◆ LANGOPT [3/3]

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

Definition at line 417 of file LangOptions.h.