14 #ifndef LLVM_CLANG_BASIC_LANGOPTIONS_H 15 #define LLVM_CLANG_BASIC_LANGOPTIONS_H 22 #include "llvm/ADT/StringRef.h" 23 #include "llvm/ADT/Triple.h" 34 #define LANGOPT(Name, Bits, Default, Description) unsigned Name : Bits; 35 #define ENUM_LANGOPT(Name, Type, Bits, Default, Description) 36 #include "clang/Basic/LangOptions.def" 41 #define LANGOPT(Name, Bits, Default, Description) 42 #define ENUM_LANGOPT(Name, Type, Bits, Default, Description) \ 44 #include "clang/Basic/LangOptions.def" 91 PPTMK_FullGeneralityVirtualInheritance
256 #define LANGOPT(Name, Bits, Default, Description) 257 #define ENUM_LANGOPT(Name, Type, Bits, Default, Description) \ 258 Type get##Name() const { return static_cast<Type>(Name); } \ 259 void set##Name(Type Value) { Name = static_cast<unsigned>(Value); } 260 #include "clang/Basic/LangOptions.def" 264 return getCompilingModule() !=
CMK_None;
269 return isCompilingModule() || ModulesLocalVisibility;
273 return getSignedOverflowBehavior() == SOB_Defined;
278 !ObjCSubscriptingLegacyRuntime;
282 return MSCompatibilityVersion >= MajorVersion * 100000U;
287 void resetNonModularOptions();
291 bool isNoBuiltinFunc(StringRef Name)
const;
295 return ObjCAutoRefCount || ObjCWeak;
299 return (CUDA && CUDAIsDevice) ||
OpenCL;
303 VersionTuple getOpenCLVersionTuple()
const;
314 : fp_contract(static_cast<
LangOptions::FPContractModeKind>(I & 3)),
315 fenv_access(static_cast<
LangOptions::FEnvAccessModeKind>((I >> 2) & 1))
319 : fp_contract(LangOpts.getDefaultFPContractMode()),
352 unsigned getInt()
const {
return fp_contract | (fenv_access << 2); }
357 unsigned fp_contract : 2;
358 unsigned fenv_access : 1;
376 #endif // LLVM_CLANG_BASIC_LANGOPTIONS_H bool isSignedOverflowDefined() const
FPOptions(const LangOptions &LangOpts)
bool isCompatibleWithMSVC(MSVCMajorVersion MajorVersion) const
SanitizerSet Sanitize
Set of enabled sanitizers.
The translation unit is a prefix to a translation unit, and is not complete.
Defines types useful for describing an Objective-C runtime.
bool isCompilingModule() const
Are we compiling a module interface (.cppm or module map)?
Floating point control options.
Compiling a C++ modules TS module interface unit.
Defines the clang::SanitizerKind enum.
std::vector< std::string > XRayAlwaysInstrumentFiles
Paths to the XRay "always instrument" files specifying which objects (files, functions, variables) should be imbued with the XRay "always instrument" attribute.
bool allowsNonTrivialObjCLifetimeQualifiers() const
True if any ObjC types may have non-trivial lifetime qualifiers.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Compiling a module from a module map.
std::vector< std::string > XRayAttrListFiles
Paths to the XRay attribute list files, specifying which objects (files, functions, variables) should be imbued with the appropriate XRay attribute(s).
bool assumeFunctionsAreConvergent() const
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
Whether values of this type can be null is (explicitly) unspecified.
Visibility
Describes the different kinds of visibility that a declaration may have.
unsigned getInt() const
Used to serialize this.
void setAllowFPContractWithinStatement()
Defines the clang::Visibility enumeration and various utility functions.
std::vector< std::string > ModuleFeatures
The names of any features to enable in module 'requires' decls in addition to the hard-coded list in ...
std::string CurrentModule
The name of the current module, of which the main source file is a part.
ClangABI
Clang versions with different platform ABI conformance.
bool allowFEnvAccess() const
static bool IsHeaderFile(const std::string &Filename)
bool isSubscriptPointerArithmetic() const
bool isSubscriptPointerArithmetic() const
Is subscripting pointer arithmetic?
CommentOptions CommentOpts
Options for parsing comments.
void setDisallowFPContract()
std::string OMPHostIRFile
Name of the IR file that contains the result of the OpenMP target host code generation.
Compiling a module from a list of header files.
Not compiling a module interface at all.
clang::ObjCRuntime ObjCRuntime
bool allowFPContractAcrossStatement() const
std::string ModuleName
The module currently being compiled as specified by -fmodule-name.
PragmaMSPointersToMembersKind
Dataflow Directional Tag Classes.
std::string OverflowHandler
The name of the handler function to be called when -ftrapv is specified.
The basic abstraction for the target Objective-C runtime.
std::vector< llvm::Triple > OMPTargetTriples
Triples of the OpenMP targets that the host code codegen should take into account in order to generat...
void setDisallowFEnvAccess()
void setAllowFPContractAcrossStatement()
bool allowFPContractWithinStatement() const
std::vector< std::string > XRayNeverInstrumentFiles
Paths to the XRay "never instrument" files specifying which objects (files, functions, variables) should be imbued with the XRay "never instrument" attribute.
std::vector< std::string > NoBuiltinFuncs
A list of all -fno-builtin-* function names (e.g., memset).
Not within a conflict marker.
TranslationUnitKind
Describes the kind of translation unit being processed.
void setAllowFEnvAccess()
The translation unit is a complete translation unit.
std::vector< std::string > SanitizerBlacklistFiles
Paths to blacklist files specifying which objects (files, functions, variables) should not be instrum...
Bitfields of LangOptions, split out from LangOptions in order to ensure that this large collection of...
bool trackLocalOwningModule() const
Do we need to track the owning module for a local declaration?
std::string ObjCConstantStringClass
The translation unit is a module.