diff options
Diffstat (limited to 'include/clang/Basic/LangOptions.def')
-rw-r--r-- | include/clang/Basic/LangOptions.def | 68 |
1 files changed, 52 insertions, 16 deletions
diff --git a/include/clang/Basic/LangOptions.def b/include/clang/Basic/LangOptions.def index a297a4c..cf9638d 100644 --- a/include/clang/Basic/LangOptions.def +++ b/include/clang/Basic/LangOptions.def @@ -9,26 +9,40 @@ // // This file defines the language options. Users of this file must // define the LANGOPT macro to make use of this information. -// Optionally, the user may also define BENIGN_LANGOPT -// (for options that don't affect the construction of the AST in an -// incompatible way), ENUM_LANGOPT (for options that have enumeration, -// rather than unsigned, type), BENIGN_ENUM_LANGOPT (for benign -// options that have enumeration type), and VALUE_LANGOPT is a language option -// that describes a value rather than a flag. // +// Optionally, the user may also define: +// +// BENIGN_LANGOPT: for options that don't affect the construction of the AST in +// any way (that is, the value can be different between an implicit module +// and the user of that module). +// +// COMPATIBLE_LANGOPT: for options that affect the construction of the AST in +// a way that doesn't prevent interoperability (that is, the value can be +// different between an explicit module and the user of that module). +// +// ENUM_LANGOPT: for options that have enumeration, rather than unsigned, type. +// +// VALUE_LANGOPT: for options that describe a value rather than a flag. +// +// BENIGN_ENUM_LANGOPT, COMPATIBLE_ENUM_LANGOPT: combinations of the above. +// +// FIXME: Clients should be able to more easily select whether they want +// different levels of compatibility versus how to handle different kinds +// of option. //===----------------------------------------------------------------------===// + #ifndef LANGOPT # error Define the LANGOPT macro to handle language options #endif -#ifndef VALUE_LANGOPT -# define VALUE_LANGOPT(Name, Bits, Default, Description) \ +#ifndef COMPATIBLE_LANGOPT +# define COMPATIBLE_LANGOPT(Name, Bits, Default, Description) \ LANGOPT(Name, Bits, Default, Description) #endif #ifndef BENIGN_LANGOPT # define BENIGN_LANGOPT(Name, Bits, Default, Description) \ - LANGOPT(Name, Bits, Default, Description) + COMPATIBLE_LANGOPT(Name, Bits, Default, Description) #endif #ifndef ENUM_LANGOPT @@ -36,11 +50,22 @@ LANGOPT(Name, Bits, Default, Description) #endif +#ifndef COMPATIBLE_ENUM_LANGOPT +# define COMPATIBLE_ENUM_LANGOPT(Name, Type, Bits, Default, Description) \ + ENUM_LANGOPT(Name, Type, Bits, Default, Description) +#endif + #ifndef BENIGN_ENUM_LANGOPT # define BENIGN_ENUM_LANGOPT(Name, Type, Bits, Default, Description) \ - ENUM_LANGOPT(Name, Type, Bits, Default, Description) + COMPATIBLE_ENUM_LANGOPT(Name, Type, Bits, Default, Description) #endif +#ifndef VALUE_LANGOPT +# define VALUE_LANGOPT(Name, Bits, Default, Description) \ + LANGOPT(Name, Bits, Default, Description) +#endif + +// FIXME: A lot of the BENIGN_ options should be COMPATIBLE_ instead. LANGOPT(C99 , 1, 0, "C99") LANGOPT(C11 , 1, 0, "C11") LANGOPT(MSVCCompat , 1, 0, "Microsoft Visual C++ full compatibility mode") @@ -49,7 +74,7 @@ LANGOPT(AsmBlocks , 1, 0, "Microsoft inline asm blocks") LANGOPT(Borland , 1, 0, "Borland extensions") LANGOPT(CPlusPlus , 1, 0, "C++") LANGOPT(CPlusPlus11 , 1, 0, "C++11") -LANGOPT(CPlusPlus1y , 1, 0, "C++1y") +LANGOPT(CPlusPlus14 , 1, 0, "C++14") LANGOPT(CPlusPlus1z , 1, 0, "C++1z") LANGOPT(ObjC1 , 1, 0, "Objective-C 1") LANGOPT(ObjC2 , 1, 0, "Objective-C 2") @@ -101,16 +126,19 @@ LANGOPT(ModulesDeclUse , 1, 0, "require declaration of module uses") LANGOPT(ModulesSearchAll , 1, 1, "search even non-imported modules to find unresolved references") LANGOPT(ModulesStrictDeclUse, 1, 0, "require declaration of module uses and all headers to be in modules") LANGOPT(ModulesErrorRecovery, 1, 1, "automatically import modules as needed when performing error recovery") -LANGOPT(Optimize , 1, 0, "__OPTIMIZE__ predefined macro") -LANGOPT(OptimizeSize , 1, 0, "__OPTIMIZE_SIZE__ predefined macro") +BENIGN_LANGOPT(ModulesImplicitMaps, 1, 1, "use files called module.modulemap implicitly as module maps") +COMPATIBLE_LANGOPT(Optimize , 1, 0, "__OPTIMIZE__ predefined macro") +COMPATIBLE_LANGOPT(OptimizeSize , 1, 0, "__OPTIMIZE_SIZE__ predefined macro") LANGOPT(Static , 1, 0, "__STATIC__ predefined macro (as opposed to __DYNAMIC__)") VALUE_LANGOPT(PackStruct , 32, 0, "default struct packing maximum alignment") +VALUE_LANGOPT(MaxTypeAlign , 32, 0, + "default maximum alignment for types") VALUE_LANGOPT(PICLevel , 2, 0, "__PIC__ level") VALUE_LANGOPT(PIELevel , 2, 0, "__PIE__ level") LANGOPT(GNUInline , 1, 0, "GNU inline semantics") -LANGOPT(NoInlineDefine , 1, 0, "__NO_INLINE__ predefined macro") -LANGOPT(Deprecated , 1, 0, "__DEPRECATED predefined macro") +COMPATIBLE_LANGOPT(NoInlineDefine , 1, 0, "__NO_INLINE__ predefined macro") +COMPATIBLE_LANGOPT(Deprecated , 1, 0, "__DEPRECATED predefined macro") LANGOPT(FastMath , 1, 0, "__FAST_MATH__ predefined macro") LANGOPT(FiniteMathOnly , 1, 0, "__FINITE_MATH_ONLY__ predefined macro") @@ -126,8 +154,10 @@ LANGOPT(ShortEnums , 1, 0, "short enum types") LANGOPT(OpenCL , 1, 0, "OpenCL") LANGOPT(OpenCLVersion , 32, 0, "OpenCL version") LANGOPT(NativeHalfType , 1, 0, "Native half type support") +LANGOPT(HalfArgsAndReturns, 1, 0, "half args and returns") LANGOPT(CUDA , 1, 0, "CUDA") LANGOPT(OpenMP , 1, 0, "OpenMP support") +LANGOPT(CUDAIsDevice , 1, 0, "Compiling for CUDA device") LANGOPT(AssumeSaneOperatorNew , 1, 1, "implicit __attribute__((malloc)) for C++'s new operators") LANGOPT(SizedDeallocation , 1, 0, "enable sized deallocation functions") @@ -187,9 +217,15 @@ LANGOPT(ApplePragmaPack, 1, 0, "Apple gcc-compatible #pragma pack handling") LANGOPT(RetainCommentsFromSystemHeaders, 1, 0, "retain documentation comments from system headers in the AST") +LANGOPT(SanitizeAddressFieldPadding, 2, 0, "controls how aggressive is ASan " + "field padding (0: none, 1:least " + "aggressive, 2: more aggressive)") + #undef LANGOPT -#undef VALUE_LANGOPT +#undef COMPATIBLE_LANGOPT #undef BENIGN_LANGOPT #undef ENUM_LANGOPT +#undef COMPATIBLE_ENUM_LANGOPT #undef BENIGN_ENUM_LANGOPT +#undef VALUE_LANGOPT |