Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/clang/Basic/LangOptions.def is written in an unsupported language. File is not indexed.

0001 //===--- LangOptions.def - Language option database -------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // This file defines the language options. Users of this file must
0010 // define the LANGOPT macro to make use of this information. The arguments to
0011 // the macro are:
0012 //   LANGOPT(Name, Bits, DefaultValue, Description)
0013 // Note that the DefaultValue must be a constant value (literal or enumeration);
0014 // it cannot depend on the value of another language option.
0015 //
0016 // Optionally, the user may also define:
0017 //
0018 // BENIGN_LANGOPT: for options that don't affect the construction of the AST in
0019 //     any way (that is, the value can be different between an implicit module
0020 //     and the user of that module).
0021 //
0022 // COMPATIBLE_LANGOPT: for options that affect the construction of the AST in
0023 //     a way that doesn't prevent interoperability (that is, the value can be
0024 //     different between an explicit module and the user of that module).
0025 //
0026 // ENUM_LANGOPT: for options that have enumeration, rather than unsigned, type.
0027 //
0028 // VALUE_LANGOPT: for options that describe a value rather than a flag.
0029 //
0030 // BENIGN_ENUM_LANGOPT, COMPATIBLE_ENUM_LANGOPT,
0031 // BENIGN_VALUE_LANGOPT, COMPATIBLE_VALUE_LANGOPT: combinations of the above.
0032 //
0033 // FIXME: Clients should be able to more easily select whether they want
0034 // different levels of compatibility versus how to handle different kinds
0035 // of option.
0036 //
0037 // The Description field should be a noun phrase, for instance "frobbing all
0038 // widgets" or "C's implicit blintz feature".
0039 //===----------------------------------------------------------------------===//
0040 
0041 #ifndef LANGOPT
0042 #  error Define the LANGOPT macro to handle language options
0043 #endif
0044 
0045 #ifndef COMPATIBLE_LANGOPT
0046 #  define COMPATIBLE_LANGOPT(Name, Bits, Default, Description) \
0047      LANGOPT(Name, Bits, Default, Description)
0048 #endif
0049 
0050 #ifndef BENIGN_LANGOPT
0051 #  define BENIGN_LANGOPT(Name, Bits, Default, Description) \
0052      COMPATIBLE_LANGOPT(Name, Bits, Default, Description)
0053 #endif
0054 
0055 #ifndef ENUM_LANGOPT
0056 #  define ENUM_LANGOPT(Name, Type, Bits, Default, Description) \
0057      LANGOPT(Name, Bits, Default, Description)
0058 #endif
0059 
0060 #ifndef COMPATIBLE_ENUM_LANGOPT
0061 #  define COMPATIBLE_ENUM_LANGOPT(Name, Type, Bits, Default, Description) \
0062      ENUM_LANGOPT(Name, Type, Bits, Default, Description)
0063 #endif
0064 
0065 #ifndef BENIGN_ENUM_LANGOPT
0066 #  define BENIGN_ENUM_LANGOPT(Name, Type, Bits, Default, Description) \
0067      COMPATIBLE_ENUM_LANGOPT(Name, Type, Bits, Default, Description)
0068 #endif
0069 
0070 #ifndef VALUE_LANGOPT
0071 #  define VALUE_LANGOPT(Name, Bits, Default, Description) \
0072      LANGOPT(Name, Bits, Default, Description)
0073 #endif
0074 
0075 #ifndef COMPATIBLE_VALUE_LANGOPT
0076 #  define COMPATIBLE_VALUE_LANGOPT(Name, Bits, Default, Description) \
0077      VALUE_LANGOPT(Name, Bits, Default, Description)
0078 #endif
0079 
0080 #ifndef BENIGN_VALUE_LANGOPT
0081 #  define BENIGN_VALUE_LANGOPT(Name, Bits, Default, Description) \
0082      COMPATIBLE_VALUE_LANGOPT(Name, Bits, Default, Description)
0083 #endif
0084 
0085 // FIXME: A lot of the BENIGN_ options should be COMPATIBLE_ instead.
0086 LANGOPT(C99               , 1, 0, "C99")
0087 LANGOPT(C11               , 1, 0, "C11")
0088 LANGOPT(C17               , 1, 0, "C17")
0089 LANGOPT(C23               , 1, 0, "C23")
0090 LANGOPT(C2y               , 1, 0, "C2y")
0091 LANGOPT(MSVCCompat        , 1, 0, "Microsoft Visual C++ full compatibility mode")
0092 LANGOPT(Kernel            , 1, 0, "Kernel mode")
0093 LANGOPT(MicrosoftExt      , 1, 0, "Microsoft C++ extensions")
0094 LANGOPT(ZOSExt            , 1, 0, "z/OS extensions")
0095 LANGOPT(AsmBlocks         , 1, 0, "Microsoft inline asm blocks")
0096 LANGOPT(Borland           , 1, 0, "Borland extensions")
0097 LANGOPT(CPlusPlus         , 1, 0, "C++")
0098 LANGOPT(CPlusPlus11       , 1, 0, "C++11")
0099 LANGOPT(CPlusPlus14       , 1, 0, "C++14")
0100 LANGOPT(CPlusPlus17       , 1, 0, "C++17")
0101 LANGOPT(CPlusPlus20       , 1, 0, "C++20")
0102 LANGOPT(CPlusPlus23       , 1, 0, "C++23")
0103 LANGOPT(CPlusPlus26       , 1, 0, "C++26")
0104 LANGOPT(ObjC              , 1, 0, "Objective-C")
0105 BENIGN_LANGOPT(ObjCDefaultSynthProperties , 1, 0,
0106                "Objective-C auto-synthesized properties")
0107 BENIGN_LANGOPT(EncodeExtendedBlockSig , 1, 0,
0108                "Encoding extended block type signature")
0109 BENIGN_LANGOPT(EncodeCXXClassTemplateSpec , 1, 0,
0110                "Fully encode c++ class template specialization")
0111 BENIGN_LANGOPT(ObjCInferRelatedResultType , 1, 1,
0112                "Objective-C related result type inference")
0113 LANGOPT(AppExt , 1, 0, "Objective-C App Extension")
0114 LANGOPT(Trigraphs         , 1, 0,"trigraphs")
0115 LANGOPT(LineComment       , 1, 0, "'//' comments")
0116 LANGOPT(Bool              , 1, 0, "bool, true, and false keywords")
0117 LANGOPT(Half              , 1, 0, "half keyword")
0118 LANGOPT(WChar             , 1, 0, "wchar_t keyword")
0119 LANGOPT(Char8             , 1, 0, "char8_t keyword")
0120 LANGOPT(IEEE128           , 1, 0, "__ieee128 keyword")
0121 LANGOPT(DeclSpecKeyword   , 1, 0, "__declspec keyword")
0122 BENIGN_LANGOPT(DollarIdents   , 1, 1, "'$' in identifiers")
0123 BENIGN_LANGOPT(AsmPreprocessor, 1, 0, "preprocessor in asm mode")
0124 LANGOPT(GNUMode           , 1, 1, "GNU extensions")
0125 LANGOPT(GNUKeywords       , 1, 1, "GNU keywords")
0126 VALUE_LANGOPT(GNUCVersion , 32, 0, "GNU C compatibility version")
0127 LANGOPT(DisableKNRFunctions, 1, 0, "require function types to have a prototype")
0128 LANGOPT(Digraphs          , 1, 0, "digraphs")
0129 BENIGN_LANGOPT(HexFloats  , 1, 0, "C99 hexadecimal float constants")
0130 LANGOPT(CXXOperatorNames  , 1, 0, "C++ operator name keywords")
0131 LANGOPT(AppleKext         , 1, 0, "Apple kext support")
0132 BENIGN_LANGOPT(PascalStrings, 1, 0, "Pascal string support")
0133 LANGOPT(WritableStrings   , 1, 0, "writable string support")
0134 LANGOPT(ConstStrings      , 1, 0, "const-qualified string support")
0135 ENUM_LANGOPT(LaxVectorConversions, LaxVectorConversionKind, 2,
0136              LaxVectorConversionKind::All, "lax vector conversions")
0137 ENUM_LANGOPT(AltivecSrcCompat, AltivecSrcCompatKind, 2,
0138              AltivecSrcCompatKind::Default, "Altivec source compatibility")
0139 LANGOPT(ConvergentFunctions, 1, 1, "Assume convergent functions")
0140 LANGOPT(AltiVec           , 1, 0, "AltiVec-style vector initializers")
0141 LANGOPT(ZVector           , 1, 0, "System z vector extensions")
0142 LANGOPT(Exceptions        , 1, 0, "exception handling")
0143 LANGOPT(ObjCExceptions    , 1, 0, "Objective-C exceptions")
0144 LANGOPT(CXXExceptions     , 1, 0, "C++ exceptions")
0145 LANGOPT(EHAsynch          , 1, 0, "C/C++ EH Asynch exceptions")
0146 ENUM_LANGOPT(ExceptionHandling, ExceptionHandlingKind, 3,
0147              ExceptionHandlingKind::None, "exception handling")
0148 LANGOPT(IgnoreExceptions  , 1, 0, "ignore exceptions")
0149 LANGOPT(ExternCNoUnwind   , 1, 0, "Assume extern C functions don't unwind")
0150 LANGOPT(AssumeNothrowExceptionDtor , 1, 0, "Assume exception object's destructor is nothrow")
0151 LANGOPT(TraditionalCPP    , 1, 0, "traditional CPP emulation")
0152 LANGOPT(RTTI              , 1, 1, "run-time type information")
0153 LANGOPT(RTTIData          , 1, 1, "emit run-time type information data")
0154 LANGOPT(MSBitfields       , 1, 0, "Microsoft-compatible structure layout")
0155 LANGOPT(MSVolatile        , 1, 0, "Microsoft-compatible volatile loads and stores")
0156 LANGOPT(Freestanding, 1, 0, "freestanding implementation")
0157 LANGOPT(NoBuiltin         , 1, 0, "disable builtin functions")
0158 LANGOPT(NoMathBuiltin     , 1, 0, "disable math builtin functions")
0159 LANGOPT(GNUAsm            , 1, 1, "GNU-style inline assembly")
0160 LANGOPT(Coroutines        , 1, 0, "C++20 coroutines")
0161 LANGOPT(CoroAlignedAllocation, 1, 0, "prefer Aligned Allocation according to P2014 Option 2")
0162 LANGOPT(DllExportInlines  , 1, 1, "dllexported classes dllexport inline methods")
0163 LANGOPT(RelaxedTemplateTemplateArgs, 1, 1, "C++17 relaxed matching of template template arguments")
0164 LANGOPT(ExperimentalLibrary, 1, 0, "enable unstable and experimental library features")
0165 LANGOPT(RetainSubstTemplateTypeParmTypeAstNodes, 1, 0, "retain SubstTemplateTypeParmType nodes in the AST's representation of alias template specializations")
0166 
0167 LANGOPT(PointerAuthIntrinsics, 1, 0, "pointer authentication intrinsics")
0168 LANGOPT(PointerAuthCalls  , 1, 0, "function pointer authentication")
0169 LANGOPT(PointerAuthReturns, 1, 0, "return pointer authentication")
0170 LANGOPT(PointerAuthIndirectGotos, 1, 0, "indirect gotos pointer authentication")
0171 LANGOPT(PointerAuthAuthTraps, 1, 0, "pointer authentication failure traps")
0172 LANGOPT(PointerAuthVTPtrAddressDiscrimination, 1, 0, "incorporate address discrimination in authenticated vtable pointers")
0173 LANGOPT(PointerAuthVTPtrTypeDiscrimination, 1, 0, "incorporate type discrimination in authenticated vtable pointers")
0174 LANGOPT(PointerAuthTypeInfoVTPtrDiscrimination, 1, 0, "incorporate type and address discrimination in authenticated vtable pointers for std::type_info")
0175 BENIGN_LANGOPT(PointerAuthFunctionTypeDiscrimination, 1, 0,
0176                "Use type discrimination when signing function pointers")
0177 LANGOPT(PointerAuthInitFini, 1, 0, "sign function pointers in init/fini arrays")
0178 LANGOPT(PointerAuthInitFiniAddressDiscrimination, 1, 0,
0179         "incorporate address discrimination in authenticated function pointers in init/fini arrays")
0180 LANGOPT(PointerAuthELFGOT, 1, 0, "authenticate pointers from GOT")
0181 LANGOPT(AArch64JumpTableHardening, 1, 0, "use hardened lowering for jump-table dispatch")
0182 
0183 LANGOPT(DoubleSquareBracketAttributes, 1, 0, "'[[]]' attributes extension for all language standard modes")
0184 LANGOPT(ExperimentalLateParseAttributes, 1, 0, "experimental late parsing of attributes")
0185 
0186 COMPATIBLE_LANGOPT(RecoveryAST, 1, 1, "Preserve expressions in AST when encountering errors")
0187 COMPATIBLE_LANGOPT(RecoveryASTType, 1, 1, "Preserve the type in recovery expressions")
0188 
0189 BENIGN_LANGOPT(ThreadsafeStatics , 1, 1, "thread-safe static initializers")
0190 LANGOPT(POSIXThreads      , 1, 0, "POSIX thread support")
0191 LANGOPT(Blocks            , 1, 0, "blocks extension to C")
0192 BENIGN_LANGOPT(EmitAllDecls      , 1, 0, "emitting all declarations")
0193 LANGOPT(MathErrno         , 1, 1, "errno in math functions")
0194 LANGOPT(Modules           , 1, 0, "modules semantics")
0195 COMPATIBLE_LANGOPT(CPlusPlusModules, 1, 0, "C++ modules syntax")
0196 LANGOPT(SkipODRCheckInGMF, 1, 0, "Skip ODR checks for decls in the global module fragment")
0197 LANGOPT(BuiltinHeadersInSystemModules, 1, 0, "builtin headers belong to system modules, and _Builtin_ modules are ignored for cstdlib headers")
0198 BENIGN_ENUM_LANGOPT(CompilingModule, CompilingModuleKind, 3, CMK_None,
0199                     "compiling a module interface")
0200 BENIGN_LANGOPT(CompilingPCH, 1, 0, "building a pch")
0201 BENIGN_LANGOPT(BuildingPCHWithObjectFile, 1, 0, "building a pch which has a corresponding object file")
0202 BENIGN_LANGOPT(CacheGeneratedPCH, 1, 0, "cache generated PCH files in memory")
0203 BENIGN_LANGOPT(PCHInstantiateTemplates, 1, 0, "instantiate templates while building a PCH")
0204 COMPATIBLE_LANGOPT(ModulesDeclUse    , 1, 0, "require declaration of module uses")
0205 BENIGN_LANGOPT(ModulesSearchAll  , 1, 1, "searching even non-imported modules to find unresolved references")
0206 COMPATIBLE_LANGOPT(ModulesStrictDeclUse, 1, 0, "requiring declaration of module uses and all headers to be in modules")
0207 COMPATIBLE_LANGOPT(ModulesValidateTextualHeaderIncludes, 1, 1, "validation of textual header includes")
0208 BENIGN_LANGOPT(ModulesErrorRecovery, 1, 1, "automatically importing modules as needed when performing error recovery")
0209 BENIGN_LANGOPT(ImplicitModules, 1, 1, "building modules that are not specified via -fmodule-file")
0210 COMPATIBLE_LANGOPT(ModulesLocalVisibility, 1, 0, "local submodule visibility")
0211 COMPATIBLE_LANGOPT(Optimize          , 1, 0, "__OPTIMIZE__ predefined macro")
0212 COMPATIBLE_LANGOPT(OptimizeSize      , 1, 0, "__OPTIMIZE_SIZE__ predefined macro")
0213 COMPATIBLE_LANGOPT(Static            , 1, 0, "__STATIC__ predefined macro (as opposed to __DYNAMIC__)")
0214 VALUE_LANGOPT(PackStruct  , 32, 0,
0215               "default struct packing maximum alignment")
0216 VALUE_LANGOPT(MaxTypeAlign  , 32, 0,
0217               "default maximum alignment for types")
0218 VALUE_LANGOPT(AlignDouble            , 1, 0, "Controls if doubles should be aligned to 8 bytes (x86 only)")
0219 VALUE_LANGOPT(DoubleSize            , 32, 0, "width of double")
0220 VALUE_LANGOPT(LongDoubleSize        , 32, 0, "width of long double")
0221 LANGOPT(PPCIEEELongDouble            , 1, 0, "use IEEE 754 quadruple-precision for long double")
0222 LANGOPT(EnableAIXExtendedAltivecABI  , 1, 0, "__EXTABI__  predefined macro")
0223 LANGOPT(EnableAIXQuadwordAtomicsABI  , 1, 0, "Use 16-byte atomic lock free semantics")
0224 COMPATIBLE_VALUE_LANGOPT(PICLevel    , 2, 0, "__PIC__ level")
0225 COMPATIBLE_VALUE_LANGOPT(PIE         , 1, 0, "is pie")
0226 LANGOPT(ROPI                         , 1, 0, "Read-only position independence")
0227 LANGOPT(RWPI                         , 1, 0, "Read-write position independence")
0228 COMPATIBLE_LANGOPT(GNUInline         , 1, 0, "GNU inline semantics")
0229 COMPATIBLE_LANGOPT(NoInlineDefine    , 1, 0, "__NO_INLINE__ predefined macro")
0230 COMPATIBLE_LANGOPT(Deprecated        , 1, 0, "__DEPRECATED predefined macro")
0231 COMPATIBLE_LANGOPT(FastMath          , 1, 0, "fast FP math optimizations, and __FAST_MATH__ predefined macro")
0232 COMPATIBLE_LANGOPT(UnsafeFPMath      , 1, 0, "Unsafe Floating Point Math")
0233 COMPATIBLE_LANGOPT(ProtectParens     , 1, 0, "optimizer honors parentheses "
0234                    "when floating-point expressions are evaluated")
0235 BENIGN_LANGOPT(AllowFPReassoc    , 1, 0, "Permit Floating Point reassociation")
0236 BENIGN_LANGOPT(NoHonorNaNs       , 1, 0, "Permit Floating Point optimization without regard to NaN")
0237 BENIGN_LANGOPT(NoHonorInfs       , 1, 0, "Permit Floating Point optimization without regard to infinities")
0238 BENIGN_LANGOPT(NoSignedZero      , 1, 0, "Permit Floating Point optimization without regard to signed zeros")
0239 BENIGN_LANGOPT(AllowRecip        , 1, 0, "Permit Floating Point reciprocal")
0240 BENIGN_LANGOPT(ApproxFunc        , 1, 0, "Permit Floating Point approximation")
0241 
0242 ENUM_LANGOPT(ComplexRange, ComplexRangeKind, 2, CX_None, "Enable use of range reduction for complex arithmetics.")
0243 
0244 BENIGN_LANGOPT(ObjCGCBitmapPrint , 1, 0, "printing of GC's bitmap layout for __weak/__strong ivars")
0245 
0246 BENIGN_LANGOPT(AccessControl     , 1, 1, "C++ access control")
0247 LANGOPT(CharIsSigned      , 1, 1, "signed char")
0248 LANGOPT(WCharSize         , 4, 0, "width of wchar_t")
0249 LANGOPT(WCharIsSigned        , 1, 0, "signed or unsigned wchar_t")
0250 ENUM_LANGOPT(MSPointerToMemberRepresentationMethod, PragmaMSPointersToMembersKind, 2, PPTMK_BestCase, "member-pointer representation method")
0251 ENUM_LANGOPT(DefaultCallingConv, DefaultCallingConvention, 3, DCC_None, "default calling convention")
0252 
0253 LANGOPT(ShortEnums        , 1, 0, "short enum types")
0254 
0255 LANGOPT(OpenCL            , 1, 0, "OpenCL")
0256 LANGOPT(OpenCLVersion     , 32, 0, "OpenCL C version")
0257 LANGOPT(OpenCLCPlusPlus   , 1, 0, "C++ for OpenCL")
0258 LANGOPT(OpenCLCPlusPlusVersion     , 32, 0, "C++ for OpenCL version")
0259 LANGOPT(OpenCLGenericAddressSpace, 1, 0, "OpenCL generic keyword")
0260 LANGOPT(OpenCLPipes              , 1, 0, "OpenCL pipes language constructs and built-ins")
0261 LANGOPT(NativeHalfType    , 1, 0, "Native half type support")
0262 LANGOPT(NativeHalfArgsAndReturns, 1, 0, "Native half args and returns")
0263 LANGOPT(CUDA              , 1, 0, "CUDA")
0264 LANGOPT(HIP               , 1, 0, "HIP")
0265 LANGOPT(OpenMP            , 32, 0, "OpenMP support and version of OpenMP (31, 40 or 45)")
0266 LANGOPT(OpenMPExtensions  , 1, 1, "Enable all Clang extensions for OpenMP directives and clauses")
0267 LANGOPT(OpenMPSimd        , 1, 0, "Use SIMD only OpenMP support.")
0268 LANGOPT(OpenMPUseTLS      , 1, 0, "Use TLS for threadprivates or runtime calls")
0269 LANGOPT(OpenMPIsTargetDevice    , 1, 0, "Generate code only for OpenMP target device")
0270 LANGOPT(OpenMPCUDAMode    , 1, 0, "Generate code for OpenMP pragmas in SIMT/SPMD mode")
0271 LANGOPT(OpenMPIRBuilder   , 1, 0, "Use the experimental OpenMP-IR-Builder codegen path.")
0272 LANGOPT(OpenMPCUDANumSMs  , 32, 0, "Number of SMs for CUDA devices.")
0273 LANGOPT(OpenMPCUDABlocksPerSM  , 32, 0, "Number of blocks per SM for CUDA devices.")
0274 LANGOPT(OpenMPCUDAReductionBufNum , 32, 1024, "Number of the reduction records in the intermediate reduction buffer used for the teams reductions.")
0275 LANGOPT(OpenMPTargetDebug , 32, 0, "Enable debugging in the OpenMP offloading device RTL")
0276 LANGOPT(OpenMPOptimisticCollapse  , 1, 0, "Use at most 32 bits to represent the collapsed loop nest counter.")
0277 LANGOPT(OpenMPThreadSubscription  , 1, 0, "Assume work-shared loops do not have more iterations than participating threads.")
0278 LANGOPT(OpenMPTeamSubscription  , 1, 0, "Assume distributed loops do not have more iterations than participating teams.")
0279 LANGOPT(OpenMPNoThreadState  , 1, 0, "Assume that no thread in a parallel region will modify an ICV.")
0280 LANGOPT(OpenMPNoNestedParallelism  , 1, 0, "Assume that no thread in a parallel region will encounter a parallel region")
0281 LANGOPT(OpenMPOffloadMandatory  , 1, 0, "Assert that offloading is mandatory and do not create a host fallback.")
0282 LANGOPT(OpenMPForceUSM     , 1, 0, "Enable OpenMP unified shared memory mode via compiler.")
0283 LANGOPT(NoGPULib  , 1, 0, "Indicate a build without the standard GPU libraries.")
0284 
0285 LANGOPT(HLSL, 1, 0, "HLSL")
0286 ENUM_LANGOPT(HLSLVersion, HLSLLangStd, 16, HLSL_Unset, "HLSL Version")
0287 LANGOPT(HLSLStrictAvailability, 1, 0,
0288         "Strict availability diagnostic mode for HLSL built-in functions.")
0289 
0290 LANGOPT(CUDAIsDevice      , 1, 0, "compiling for CUDA device")
0291 LANGOPT(CUDAAllowVariadicFunctions, 1, 0, "allowing variadic functions in CUDA device code")
0292 LANGOPT(CUDAHostDeviceConstexpr, 1, 1, "treating unattributed constexpr functions as __host__ __device__")
0293 LANGOPT(GPUDeviceApproxTranscendentals, 1, 0, "using approximate transcendental functions")
0294 LANGOPT(GPURelocatableDeviceCode, 1, 0, "generate relocatable device code")
0295 LANGOPT(OffloadImplicitHostDeviceTemplates, 1, 0, "assume template functions to be implicitly host device by default for CUDA/HIP")
0296 LANGOPT(GPUAllowDeviceInit, 1, 0, "allowing device side global init functions for HIP")
0297 LANGOPT(GPUMaxThreadsPerBlock, 32, 1024, "default max threads per block for kernel launch bounds for HIP")
0298 LANGOPT(GPUDeferDiag, 1, 0, "defer host/device related diagnostic messages for CUDA/HIP")
0299 LANGOPT(GPUExcludeWrongSideOverloads, 1, 0, "always exclude wrong side overloads in overloading resolution for CUDA/HIP")
0300 LANGOPT(OffloadingNewDriver, 1, 0, "use the new driver for generating offloading code.")
0301 LANGOPT(OffloadViaLLVM, 1, 0, "target LLVM/Offload as portable offloading runtime.")
0302 
0303 LANGOPT(SYCLIsDevice      , 1, 0, "Generate code for SYCL device")
0304 LANGOPT(SYCLIsHost        , 1, 0, "SYCL host compilation")
0305 ENUM_LANGOPT(SYCLVersion  , SYCLMajorVersion, 2, SYCL_None, "Version of the SYCL standard used")
0306 
0307 LANGOPT(HIPUseNewLaunchAPI, 1, 0, "Use new kernel launching API for HIP")
0308 LANGOPT(OffloadUniformBlock, 1, 0, "Assume that kernels are launched with uniform block sizes (default true for CUDA/HIP and false otherwise)")
0309 LANGOPT(HIPStdPar, 1, 0, "Enable Standard Parallel Algorithm Acceleration for HIP (experimental)")
0310 LANGOPT(HIPStdParInterposeAlloc, 1, 0, "Replace allocations / deallocations with HIP RT calls when Standard Parallel Algorithm Acceleration for HIP is enabled (Experimental)")
0311 
0312 LANGOPT(OpenACC           , 1, 0, "OpenACC Enabled")
0313 
0314 LANGOPT(MSVCEnableStdcMacro , 1, 0, "Define __STDC__ with '-fms-compatibility'")
0315 LANGOPT(SizedDeallocation , 1, 0, "sized deallocation")
0316 LANGOPT(AlignedAllocation , 1, 0, "aligned allocation")
0317 LANGOPT(AlignedAllocationUnavailable, 1, 0, "aligned allocation functions are unavailable")
0318 LANGOPT(NewAlignOverride  , 32, 0, "maximum alignment guaranteed by '::operator new(size_t)'")
0319 BENIGN_LANGOPT(ModulesCodegen , 1, 0, "Modules code generation")
0320 BENIGN_LANGOPT(ModulesDebugInfo , 1, 0, "Modules debug info")
0321 BENIGN_LANGOPT(ElideConstructors , 1, 1, "C++ copy constructor elision")
0322 BENIGN_LANGOPT(DumpRecordLayouts , 1, 0, "dumping the layout of IRgen'd records")
0323 BENIGN_LANGOPT(DumpRecordLayoutsSimple , 1, 0, "dumping the layout of IRgen'd records in a simple form")
0324 BENIGN_LANGOPT(DumpRecordLayoutsCanonical , 1, 0, "dumping the AST layout of records using canonical field types")
0325 BENIGN_LANGOPT(DumpRecordLayoutsComplete , 1, 0, "dumping the AST layout of all complete records")
0326 BENIGN_LANGOPT(DumpVTableLayouts , 1, 0, "dumping the layouts of emitted vtables")
0327 LANGOPT(NoConstantCFStrings , 1, 0, "no constant CoreFoundation strings")
0328 BENIGN_LANGOPT(InlineVisibilityHidden , 1, 0, "hidden visibility for inline C++ methods")
0329 BENIGN_ENUM_LANGOPT(DefaultVisibilityExportMapping, DefaultVisiblityExportMapping, 2, DefaultVisiblityExportMapping::None, "controls mapping of default visibility to dllexport")
0330 BENIGN_LANGOPT(IgnoreXCOFFVisibility, 1, 0, "All the visibility attributes that are specified in the source code are ignored in aix XCOFF.")
0331 BENIGN_LANGOPT(VisibilityInlinesHiddenStaticLocalVar, 1, 0,
0332                "hidden visibility for static local variables in inline C++ "
0333                "methods when -fvisibility-inlines hidden is enabled")
0334 ENUM_LANGOPT(GlobalAllocationFunctionVisibility, VisibilityForcedKinds, 3, VisibilityForcedKinds::ForceDefault,
0335              "How to apply visibility to global operator new and delete declarations")
0336 LANGOPT(NewInfallible , 1, 0, "Treats throwing global C++ operator new as always returning valid memory (annotates with __attribute__((returns_nonnull)) and throw()). This is detectable in source.")
0337 BENIGN_LANGOPT(ParseUnknownAnytype, 1, 0, "__unknown_anytype")
0338 BENIGN_LANGOPT(DebuggerSupport , 1, 0, "debugger support")
0339 BENIGN_LANGOPT(DebuggerCastResultToId, 1, 0, "for 'po' in the debugger, cast the result to id if it is of unknown type")
0340 BENIGN_LANGOPT(DebuggerObjCLiteral , 1, 0, "debugger Objective-C literals and subscripting support")
0341 
0342 BENIGN_LANGOPT(SpellChecking , 1, 1, "spell-checking")
0343 LANGOPT(SinglePrecisionConstants , 1, 0, "treating double-precision floating point constants as single precision constants")
0344 LANGOPT(FastRelaxedMath , 1, 0, "OpenCL fast relaxed math")
0345 BENIGN_LANGOPT(CLNoSignedZero , 1, 0, "Permit Floating Point optimization without regard to signed zeros")
0346 COMPATIBLE_LANGOPT(CLUnsafeMath , 1, 0, "Unsafe Floating Point Math")
0347 /// FP_CONTRACT mode (on/off/fast).
0348 BENIGN_ENUM_LANGOPT(DefaultFPContractMode, FPModeKind, 2, FPM_Off, "FP contraction type")
0349 COMPATIBLE_LANGOPT(ExpStrictFP, 1, false, "Enable experimental strict floating point")
0350 BENIGN_LANGOPT(RoundingMath, 1, false, "Do not assume default floating-point rounding behavior")
0351 BENIGN_ENUM_LANGOPT(FPExceptionMode, FPExceptionModeKind, 2, FPE_Default, "FP Exception Behavior Mode type")
0352 BENIGN_ENUM_LANGOPT(FPEvalMethod, FPEvalMethodKind, 2, FEM_UnsetOnCommandLine, "FP type used for floating point arithmetic")
0353 ENUM_LANGOPT(Float16ExcessPrecision, ExcessPrecisionKind, 2, FPP_Standard, "Intermediate truncation behavior for Float16 arithmetic")
0354 ENUM_LANGOPT(BFloat16ExcessPrecision, ExcessPrecisionKind, 2, FPP_Standard, "Intermediate truncation behavior for BFloat16 arithmetic")
0355 LANGOPT(NoBitFieldTypeAlign , 1, 0, "bit-field type alignment")
0356 LANGOPT(HexagonQdsp6Compat , 1, 0, "hexagon-qdsp6 backward compatibility")
0357 LANGOPT(ObjCAutoRefCount , 1, 0, "Objective-C automated reference counting")
0358 LANGOPT(ObjCWeakRuntime     , 1, 0, "__weak support in the ARC runtime")
0359 LANGOPT(ObjCWeak            , 1, 0, "Objective-C __weak in ARC and MRC files")
0360 LANGOPT(ObjCSubscriptingLegacyRuntime         , 1, 0, "Subscripting support in legacy ObjectiveC runtime")
0361 BENIGN_LANGOPT(CompatibilityQualifiedIdBlockParamTypeChecking, 1, 0,
0362                "compatibility mode for type checking block parameters "
0363                "involving qualified id types")
0364 LANGOPT(ObjCDisableDirectMethodsForTesting, 1, 0,
0365         "Disable recognition of objc_direct methods")
0366 LANGOPT(CFProtectionBranch , 1, 0, "Control-Flow Branch Protection enabled")
0367 ENUM_LANGOPT(CFBranchLabelScheme, CFBranchLabelSchemeKind, 2, CFBranchLabelSchemeKind::Default,
0368              "Control-Flow Branch Protection Label Scheme")
0369 LANGOPT(FakeAddressSpaceMap , 1, 0, "OpenCL fake address space map")
0370 ENUM_LANGOPT(AddressSpaceMapMangling , AddrSpaceMapMangling, 2, ASMM_Target, "OpenCL address space map mangling mode")
0371 LANGOPT(IncludeDefaultHeader, 1, 0, "Include default header file for OpenCL")
0372 LANGOPT(DeclareOpenCLBuiltins, 1, 0, "Declare OpenCL builtin functions")
0373 BENIGN_LANGOPT(DelayedTemplateParsing , 1, 0, "delayed template parsing")
0374 LANGOPT(BlocksRuntimeOptional , 1, 0, "optional blocks runtime")
0375 LANGOPT(
0376     CompleteMemberPointers, 1, 0,
0377     "Require member pointer base types to be complete at the point where the "
0378     "type's inheritance model would be determined under the Microsoft ABI")
0379 
0380 ENUM_LANGOPT(GC, GCMode, 2, NonGC, "Objective-C Garbage Collection mode")
0381 BENIGN_ENUM_LANGOPT(ValueVisibilityMode, Visibility, 3, DefaultVisibility,
0382              "default visibility for functions and variables [-fvisibility]")
0383 BENIGN_ENUM_LANGOPT(TypeVisibilityMode, Visibility, 3, DefaultVisibility,
0384              "default visibility for types [-ftype-visibility]")
0385 LANGOPT(SetVisibilityForExternDecls, 1, 0,
0386         "apply global symbol visibility to external declarations without an explicit visibility")
0387 BENIGN_LANGOPT(VisibilityFromDLLStorageClass, 1, 0,
0388                "override the visibility of globals based on their final DLL storage class [-fvisibility-from-dllstorageclass]")
0389 BENIGN_ENUM_LANGOPT(DLLExportVisibility, VisibilityFromDLLStorageClassKinds, 3, VisibilityFromDLLStorageClassKinds::Default,
0390              "how to adjust the visibility for functions and variables with dllexport annotations [-fvisibility-dllexport]")
0391 BENIGN_ENUM_LANGOPT(NoDLLStorageClassVisibility, VisibilityFromDLLStorageClassKinds, 3, VisibilityFromDLLStorageClassKinds::Hidden,
0392              "how to adjust the visibility for functions and variables without an explicit DLL storage class [-fvisibility-nodllstorageclass]")
0393 BENIGN_ENUM_LANGOPT(ExternDeclDLLImportVisibility, VisibilityFromDLLStorageClassKinds, 3, VisibilityFromDLLStorageClassKinds::Default,
0394              "how to adjust the visibility for external declarations with dllimport annotations [-fvisibility-externs-dllimport]")
0395 BENIGN_ENUM_LANGOPT(ExternDeclNoDLLStorageClassVisibility, VisibilityFromDLLStorageClassKinds, 3,  VisibilityFromDLLStorageClassKinds::Hidden,
0396              "how to adjust the visibility for external declarations without an explicit DLL storage class [-fvisibility-externs-nodllstorageclass]")
0397 BENIGN_LANGOPT(SemanticInterposition        , 1, 0, "semantic interposition")
0398 BENIGN_LANGOPT(HalfNoSemanticInterposition, 1, 0,
0399                "Like -fno-semantic-interposition but don't use local aliases")
0400 ENUM_LANGOPT(StackProtector, StackProtectorMode, 2, SSPOff,
0401              "stack protector mode")
0402 ENUM_LANGOPT(TrivialAutoVarInit, TrivialAutoVarInitKind, 2, TrivialAutoVarInitKind::Uninitialized,
0403              "trivial automatic variable initialization")
0404 VALUE_LANGOPT(TrivialAutoVarInitStopAfter, 32, 0,
0405              "stop trivial automatic variable initialization after the specified number of instances. Must be greater than 0.")
0406 VALUE_LANGOPT(TrivialAutoVarInitMaxSize, 32, 0,
0407              "stop trivial automatic variable initialization if var size exceeds the specified size (in bytes). Must be greater than 0.")
0408 ENUM_LANGOPT(SignedOverflowBehavior, SignedOverflowBehaviorTy, 2, SOB_Undefined,
0409              "signed integer overflow handling")
0410 LANGOPT(PointerOverflowDefined, 1, 0, "make pointer overflow defined")
0411 ENUM_LANGOPT(ThreadModel  , ThreadModelKind, 2, ThreadModelKind::POSIX, "Thread Model")
0412 
0413 BENIGN_LANGOPT(ArrowDepth, 32, 256,
0414                "maximum number of operator->s to follow")
0415 BENIGN_LANGOPT(InstantiationDepth, 32, 1024,
0416                "maximum template instantiation depth")
0417 BENIGN_LANGOPT(ConstexprCallDepth, 32, 512,
0418                "maximum constexpr call depth")
0419 BENIGN_LANGOPT(ConstexprStepLimit, 32, 1048576,
0420                "maximum constexpr evaluation steps")
0421 BENIGN_LANGOPT(EnableNewConstInterp, 1, 0,
0422                "enable the experimental new constant interpreter")
0423 BENIGN_LANGOPT(BracketDepth, 32, 256,
0424                "maximum bracket nesting depth")
0425 BENIGN_LANGOPT(NumLargeByValueCopy, 32, 0,
0426         "if non-zero, warn about parameter or return Warn if parameter/return value is larger in bytes than this setting. 0 is no check.")
0427 VALUE_LANGOPT(MSCompatibilityVersion, 32, 0, "Microsoft Visual C/C++ Version")
0428 ENUM_LANGOPT(VtorDispMode, MSVtorDispMode, 2, MSVtorDispMode::ForVBaseOverride,
0429              "How many vtordisps to insert")
0430 
0431 LANGOPT(ApplePragmaPack, 1, 0, "Apple gcc-compatible #pragma pack handling")
0432 
0433 LANGOPT(XLPragmaPack, 1, 0, "IBM XL #pragma pack handling")
0434 
0435 COMPATIBLE_LANGOPT(RetainCommentsFromSystemHeaders, 1, 0, "retain documentation comments from system headers in the AST")
0436 
0437 LANGOPT(APINotes, 1, 0, "use external API notes")
0438 LANGOPT(APINotesModules, 1, 0, "use module-based external API notes")
0439 
0440 LANGOPT(SanitizeAddressFieldPadding, 2, 0, "controls how aggressive is ASan "
0441                                            "field padding (0: none, 1:least "
0442                                            "aggressive, 2: more aggressive)")
0443 
0444 LANGOPT(Cmse, 1, 0, "ARM Security extensions support")
0445 
0446 LANGOPT(XRayInstrument, 1, 0, "controls whether to do XRay instrumentation")
0447 LANGOPT(XRayAlwaysEmitCustomEvents, 1, 0,
0448         "controls whether to always emit intrinsic calls to "
0449         "__xray_customevent(...) builtin.")
0450 LANGOPT(XRayAlwaysEmitTypedEvents, 1, 0,
0451         "controls whether to always emit intrinsic calls to "
0452         "__xray_typedevent(...) builtin.")
0453 
0454 LANGOPT(ForceEmitVTables, 1, 0, "whether to emit all vtables")
0455 
0456 BENIGN_LANGOPT(AllowEditorPlaceholders, 1, 0,
0457                "allow editor placeholders in source")
0458 
0459 ENUM_LANGOPT(ClangABICompat, ClangABI, 4, ClangABI::Latest,
0460              "version of Clang that we should attempt to be ABI-compatible "
0461              "with")
0462 
0463 COMPATIBLE_VALUE_LANGOPT(FunctionAlignment, 5, 0, "Default alignment for functions")
0464 COMPATIBLE_VALUE_LANGOPT(LoopAlignment, 32, 0, "Default alignment for loops")
0465 
0466 LANGOPT(FixedPoint, 1, 0, "fixed point types")
0467 LANGOPT(PaddingOnUnsignedFixedPoint, 1, 0,
0468         "unsigned fixed point types having one extra padding bit")
0469 
0470 ENUM_LANGOPT(RegisterStaticDestructors, RegisterStaticDestructorsKind, 2,
0471              RegisterStaticDestructorsKind::All,
0472              "Register C++ static destructors")
0473 
0474 LANGOPT(RegCall4, 1, 0, "Set __regcall4 as a default calling convention to respect __regcall ABI v.4")
0475 
0476 LANGOPT(MatrixTypes, 1, 0, "Enable or disable the builtin matrix type")
0477 
0478 LANGOPT(CXXAssumptions, 1, 1, "Enable or disable codegen and compile-time checks for C++23's [[assume]] attribute")
0479 
0480 LANGOPT(RawStringLiterals, 1, 1, "Enable or disable raw string literals")
0481 
0482 ENUM_LANGOPT(StrictFlexArraysLevel, StrictFlexArraysLevelKind, 2,
0483              StrictFlexArraysLevelKind::Default,
0484              "Rely on strict definition of flexible arrays")
0485 
0486 COMPATIBLE_VALUE_LANGOPT(MaxTokens, 32, 0, "Max number of tokens per TU or 0")
0487 
0488 ENUM_LANGOPT(SignReturnAddressScope, SignReturnAddressScopeKind, 2, SignReturnAddressScopeKind::None,
0489              "Scope of return address signing")
0490 ENUM_LANGOPT(SignReturnAddressKey, SignReturnAddressKeyKind, 1, SignReturnAddressKeyKind::AKey,
0491              "Key used for return address signing")
0492 LANGOPT(BranchTargetEnforcement, 1, 0, "Branch-target enforcement enabled")
0493 LANGOPT(BranchProtectionPAuthLR, 1, 0, "Use PC as a diversifier using PAuthLR NOP instructions.")
0494 LANGOPT(GuardedControlStack, 1, 0, "Guarded control stack enabled")
0495 
0496 LANGOPT(SpeculativeLoadHardening, 1, 0, "Speculative load hardening enabled")
0497 
0498 LANGOPT(RelativeCXXABIVTables, 1, 0,
0499         "Use an ABI-incompatible v-table layout that uses relative references")
0500 
0501 LANGOPT(OmitVTableRTTI, 1, 0,
0502         "Use an ABI-incompatible v-table layout that omits the RTTI component")
0503 
0504 LANGOPT(VScaleMin, 32, 0, "Minimum vscale value")
0505 LANGOPT(VScaleMax, 32, 0, "Maximum vscale value")
0506 
0507 ENUM_LANGOPT(ExtendIntArgs, ExtendArgsKind, 1, ExtendArgsKind::ExtendTo32,
0508              "Controls how scalar integer arguments are extended in calls "
0509              "to unprototyped and varargs functions")
0510 
0511 VALUE_LANGOPT(FuchsiaAPILevel, 32, 0, "Fuchsia API level")
0512 
0513 // This option will be removed in the future once the backend
0514 // supports all operations (like division or float-to-integer conversion)
0515 // on large _BitInts.
0516 BENIGN_VALUE_LANGOPT(MaxBitIntWidth, 32, 128, "Maximum width of a _BitInt")
0517 
0518 COMPATIBLE_LANGOPT(IncrementalExtensions, 1, 0, " True if we want to process statements"
0519         "on the global scope, ignore EOF token and continue later on (thus "
0520         "avoid tearing the Lexer and etc. down). Controlled by "
0521         "-fincremental-extensions.")
0522 
0523 BENIGN_LANGOPT(CheckNew, 1, 0, "Do not assume C++ operator new may not return NULL")
0524 
0525 // FIXME: It would be better for us to find a way to encode the state of this
0526 // diagnostic in tablegen so that we can specify a particular diagnostic option
0527 // is disabled or enabled based on other language options or made it easier to
0528 // do this from the compiler invocation without hitting option round-tripping
0529 // issues.
0530 BENIGN_LANGOPT(CheckConstexprFunctionBodies, 1, 1,
0531                "Emit diagnostics for a constexpr function body that can never "
0532                "be used in a constant expression.")
0533 
0534 LANGOPT(BoundsSafety, 1, 0, "Bounds safety extension for C")
0535 
0536 LANGOPT(PreserveVec3Type, 1, 0, "Preserve 3-component vector type")
0537 
0538 #undef LANGOPT
0539 #undef COMPATIBLE_LANGOPT
0540 #undef BENIGN_LANGOPT
0541 #undef ENUM_LANGOPT
0542 #undef COMPATIBLE_ENUM_LANGOPT
0543 #undef BENIGN_ENUM_LANGOPT
0544 #undef VALUE_LANGOPT
0545 #undef COMPATIBLE_VALUE_LANGOPT
0546 #undef BENIGN_VALUE_LANGOPT