clang 22.0.0git
LangOptions.h
Go to the documentation of this file.
1//===- LangOptions.h - C Language Family Language Options -------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9/// \file
10/// Defines the clang::LangOptions interface.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_CLANG_BASIC_LANGOPTIONS_H
15#define LLVM_CLANG_BASIC_LANGOPTIONS_H
16
19#include "clang/Basic/LLVM.h"
25#include "llvm/ADT/FloatingPointMode.h"
26#include "llvm/ADT/StringRef.h"
27#include "llvm/BinaryFormat/DXContainer.h"
28#include "llvm/TargetParser/Triple.h"
29#include <optional>
30#include <string>
31#include <vector>
32
33namespace clang {
34
35/// In the Microsoft ABI, this controls the placement of virtual displacement
36/// members used to implement virtual inheritance.
38
39/// Shader programs run in specific pipeline stages.
40/// The order of these values matters, and must be kept in sync with the
41/// Triple Environment enum in llvm::Triple. The ordering is enforced in
42/// static_asserts in Triple.cpp and in clang/Basic/HLSLRuntime.h.
43enum class ShaderStage {
44 Pixel = 0,
45 Vertex,
47 Hull,
48 Domain,
49 Compute,
50 Library,
53 AnyHit,
55 Miss,
57 Mesh,
59 Invalid,
60};
61
62enum class PointerAuthenticationMode : unsigned {
63 None,
64 Strip,
67};
68
69/// Bitfields of LangOptions, split out from LangOptions in order to ensure that
70/// this large collection of bitfields is a trivial class type.
72 friend class CompilerInvocation;
74
75public:
77 using RoundingMode = llvm::RoundingMode;
79
80 /// For ASTs produced with different option value, signifies their level of
81 /// compatibility.
82 enum class CompatibilityKind {
83 /// Does affect the construction of the AST in a way that does prevent
84 /// module interoperability.
86 /// Does affect the construction of the AST in a way that doesn't prevent
87 /// interoperability (that is, the value can be different between an
88 /// explicit module and the user of that module).
90 /// Does not affect the construction of the AST in any way (that is, the
91 /// value can be different between an implicit module and the user of that
92 /// module).
93 Benign,
94 };
95
98
99 // Automatic variables live on the stack, and when trivial they're usually
100 // uninitialized because it's undefined behavior to use them without
101 // initializing them.
103
105 // Default C standard behavior.
107
108 // -fwrapv
110
111 // -ftrapv
113 };
114
115 // FIXME: Unify with TUKind.
117 /// Not compiling a module interface at all.
119
120 /// Compiling a module from a module map.
122
123 /// Compiling a module header unit.
125
126 /// Compiling a C++ modules interface unit.
128 };
129
135 };
136
138
147 };
148
150
151 // Corresponds to _MSC_VER
153 MSVC2010 = 1600,
154 MSVC2012 = 1700,
155 MSVC2013 = 1800,
156 MSVC2015 = 1900,
157 MSVC2017 = 1910,
160 MSVC2019 = 1920,
165 };
166
171 // The "default" SYCL version to be used when none is specified on the
172 // frontend command line.
174 };
175
178 HLSL_2015 = 2015,
179 HLSL_2016 = 2016,
180 HLSL_2017 = 2017,
181 HLSL_2018 = 2018,
182 HLSL_2021 = 2021,
183 HLSL_202x = 2028,
184 HLSL_202y = 2029,
185 };
186
187 /// Clang versions with different platform ABI conformance.
188 enum class ClangABI {
189#define ABI_VER_MAJOR_MINOR(Major, Minor) Ver##Major##_##Minor,
190#define ABI_VER_MAJOR(Major) Ver##Major,
191#define ABI_VER_LATEST(Latest) Latest
192#include "clang/Basic/ABIVersions.def"
193 };
194
195 enum class CoreFoundationABI {
196 /// No interoperability ABI has been specified
198 /// CoreFoundation does not have any language interoperability
200 /// Interoperability with the ObjectiveC runtime
202 /// Interoperability with the latest known version of the Swift runtime
203 Swift,
204 /// Interoperability with the Swift 5.0 runtime
205 Swift5_0,
206 /// Interoperability with the Swift 4.2 runtime
207 Swift4_2,
208 /// Interoperability with the Swift 4.1 runtime
209 Swift4_1,
210 };
211
213 // Disable the floating point pragma
215
216 // Enable the floating point pragma
218
219 // Aggressively fuse FP ops (E.g. FMA) disregarding pragmas.
221
222 // Aggressively fuse FP ops and honor pragmas.
224 };
225
226 /// Possible floating point exception behavior.
228 /// Assume that floating-point exceptions are masked.
230 /// Transformations do not cause new exceptions but may hide some.
232 /// Strictly preserve the floating-point exception semantics.
234 /// Used internally to represent initial unspecified value.
236 };
237
238 /// Possible float expression evaluation method choices.
239 enum FPEvalMethodKind : unsigned {
240 /// Use the declared type for fp arithmetic.
242 /// Use the type double for fp arithmetic.
244 /// Use extended type for fp arithmetic.
246 /// Used only for FE option processing; this is only used to indicate that
247 /// the user did not specify an explicit evaluation method on the command
248 /// line and so the target should be queried for its default evaluation
249 /// method instead.
251 };
252
254
256 /// Permit no implicit vector bitcasts.
257 None,
258 /// Permit vector bitcasts between integer vectors with different numbers
259 /// of elements but the same total bit-width.
260 Integer,
261 /// Permit vector bitcasts between all vectors with the same total
262 /// bit-width.
263 All,
264 };
265
267 // All vector compares produce scalars except vector pixel and vector bool.
268 // The types vector pixel and vector bool return vector results.
269 Mixed,
270 // All vector compares produce vector results as in GCC.
271 GCC,
272 // All vector compares produce scalars as in XL.
273 XL,
274 // Default clang behaviour.
275 Default = Mixed,
276 };
277
279 /// No signing for any function.
280 None,
281 /// Sign the return address of functions that spill LR.
282 NonLeaf,
283 /// Sign the return address of all functions,
284 All
285 };
286
288 /// Return address signing uses APIA key.
289 AKey,
290 /// Return address signing uses APIB key.
291 BKey
292 };
293
294 enum class ThreadModelKind {
295 /// POSIX Threads.
296 POSIX,
297 /// Single Threaded Environment.
298 Single
299 };
300
301 enum class ExtendArgsKind {
302 /// Integer arguments are sign or zero extended to 32/64 bits
303 /// during default argument promotions.
306 };
307
309 /// Legacy default stream
310 Legacy,
311 /// Per-thread default stream
312 PerThread,
313 };
314
315 /// Exclude certain code patterns from being instrumented by arithmetic
316 /// overflow sanitizers
318 /// Don't exclude any overflow patterns from sanitizers
319 None = 1 << 0,
320 /// Exclude all overflow patterns (below)
321 All = 1 << 1,
322 /// if (a + b < a)
324 /// if (a + b < a)
326 /// -1UL
328 /// while (count--)
330 };
331
333 None,
334 /// map only explicit default visibilities to exported
335 Explicit,
336 /// map all default visibilities to exported
337 All,
338 };
339
341 /// Force hidden visibility
343 /// Force protected visibility
345 /// Force default visibility
347 /// Don't alter the visibility
348 Source,
349 };
350
352 /// Keep the IR-gen assigned visibility.
353 Keep,
354 /// Override the IR-gen assigned visibility with default visibility.
355 Default,
356 /// Override the IR-gen assigned visibility with hidden visibility.
357 Hidden,
358 /// Override the IR-gen assigned visibility with protected visibility.
359 Protected,
360 };
361
363 /// Any trailing array member is a FAM.
364 Default = 0,
365 /// Any trailing array member of undefined, 0, or 1 size is a FAM.
367 /// Any trailing array member of undefined or 0 size is a FAM.
369 /// Any trailing array member of undefined size is a FAM.
370 IncompleteOnly = 3,
371 };
372
373 /// Controls the various implementations for complex multiplication and
374 // division.
376 /// Implementation of complex division and multiplication using a call to
377 /// runtime library functions(generally the case, but the BE might
378 /// sometimes replace the library call if it knows enough about the
379 /// potential range of the inputs). Overflow and non-finite values are
380 /// handled by the library implementation. This is the default value.
382
383 /// Implementation of complex division offering an improved handling
384 /// for overflow in intermediate calculations with no special handling for
385 /// NaN and infinite values.
387
388 /// Implementation of complex division using algebraic formulas at
389 /// higher precision. Overflow is handled. Non-finite values are handled in
390 /// some cases. If the target hardware does not have native support for a
391 /// higher precision data type, an implementation for the complex operation
392 /// will be used to provide improved guards against intermediate overflow,
393 /// but overflow and underflow may still occur in some cases. NaN and
394 /// infinite values are not handled.
396
397 /// Implementation of complex division and multiplication using
398 /// algebraic formulas at source precision. No special handling to avoid
399 /// overflow. NaN and infinite values are not handled.
401
402 /// No range rule is enabled.
403 CX_None
404 };
405
406 /// Controls which variables have static destructors registered.
408 /// Register static destructors for all variables.
409 All,
410 /// Register static destructors only for thread-local variables.
412 /// Don't register static destructors for any variables.
413 None,
414 };
415
416 // Define simple language options (with no accessors).
417#define LANGOPT(Name, Bits, Default, Compatibility, Description) \
418 unsigned Name : Bits;
419#define ENUM_LANGOPT(Name, Type, Bits, Default, Compatibility, Description)
420#include "clang/Basic/LangOptions.def"
421
422protected:
423 // Define language options of enumeration type. These are private, and will
424 // have accessors (below).
425#define LANGOPT(Name, Bits, Default, Compatibility, Description)
426#define ENUM_LANGOPT(Name, Type, Bits, Default, Compatibility, Description) \
427 LLVM_PREFERRED_TYPE(Type) \
428 unsigned Name : Bits;
429#include "clang/Basic/LangOptions.def"
430};
431
432/// Keeps track of the various options that can be
433/// enabled, which controls the dialect of C or C++ that is accepted.
435public:
436 /// The used language standard.
438
439 /// Set of enabled sanitizers.
441 /// Is at least one coverage instrumentation type enabled.
442 bool SanitizeCoverage = false;
443
444 /// Paths to files specifying which objects
445 /// (files, functions, variables) should not be instrumented.
446 std::vector<std::string> NoSanitizeFiles;
447
448 /// Paths to the XRay "always instrument" files specifying which
449 /// objects (files, functions, variables) should be imbued with the XRay
450 /// "always instrument" attribute.
451 /// WARNING: This is a deprecated field and will go away in the future.
452 std::vector<std::string> XRayAlwaysInstrumentFiles;
453
454 /// Paths to the XRay "never instrument" files specifying which
455 /// objects (files, functions, variables) should be imbued with the XRay
456 /// "never instrument" attribute.
457 /// WARNING: This is a deprecated field and will go away in the future.
458 std::vector<std::string> XRayNeverInstrumentFiles;
459
460 /// Paths to the XRay attribute list files, specifying which objects
461 /// (files, functions, variables) should be imbued with the appropriate XRay
462 /// attribute(s).
463 std::vector<std::string> XRayAttrListFiles;
464
465 /// Paths to special case list files specifying which entities
466 /// (files, functions) should or should not be instrumented.
467 std::vector<std::string> ProfileListFiles;
468
470
472
474
475 /// The name of the handler function to be called when -ftrapv is
476 /// specified.
477 ///
478 /// If none is specified, abort (GCC-compatible behaviour).
479 std::string OverflowHandler;
480
481 /// The module currently being compiled as specified by -fmodule-name.
482 std::string ModuleName;
483
484 /// The name of the current module, of which the main source file
485 /// is a part. If CompilingModule is set, we are compiling the interface
486 /// of this module, otherwise we are compiling an implementation file of
487 /// it. This starts as ModuleName in case -fmodule-name is provided and
488 /// changes during compilation to reflect the current module.
489 std::string CurrentModule;
490
491 /// The names of any features to enable in module 'requires' decls
492 /// in addition to the hard-coded list in Module.cpp and the target features.
493 ///
494 /// This list is sorted.
495 std::vector<std::string> ModuleFeatures;
496
497 /// Options for parsing comments.
499
500 /// A list of all -fno-builtin-* function names (e.g., memset).
501 std::vector<std::string> NoBuiltinFuncs;
502
503 /// A prefix map for __FILE__, __BASE_FILE__ and __builtin_FILE().
504 std::map<std::string, std::string, std::greater<std::string>> MacroPrefixMap;
505
506 /// Triples of the OpenMP targets that the host code codegen should
507 /// take into account in order to generate accurate offloading descriptors.
508 std::vector<llvm::Triple> OMPTargetTriples;
509
510 /// Name of the IR file that contains the result of the OpenMP target
511 /// host code generation.
512 std::string OMPHostIRFile;
513
514 /// The user provided compilation unit ID, if non-empty. This is used to
515 /// externalize static variables which is needed to support accessing static
516 /// device variables in host code for single source offloading languages
517 /// like CUDA/HIP.
518 std::string CUID;
519
520 /// C++ ABI to compile with, if specified by the frontend through -fc++-abi=.
521 /// This overrides the default ABI used by the target.
522 std::optional<TargetCXXABI::Kind> CXXABI;
523
524 /// Indicates whether the front-end is explicitly told that the
525 /// input is a header file (i.e. -x c-header).
526 bool IsHeaderFile = false;
527
528 /// The default stream kind used for HIP kernel launching.
530
531 /// Which overflow patterns should be excluded from sanitizer instrumentation
533
534 std::vector<std::string> OverflowPatternExclusionValues;
535
536 /// The seed used by the randomize structure layout feature.
537 std::string RandstructSeed;
538
539 /// Indicates whether to use target's platform-specific file separator when
540 /// __FILE__ macro is used and when concatenating filename with directory or
541 /// to use build environment environment's platform-specific file separator.
542 ///
543 /// The plaform-specific path separator is the backslash(\‍) for Windows and
544 /// forward slash (/) elsewhere.
546
547 // Indicates whether we should keep all nullptr checks for pointers
548 // received as a result of a standard operator new (-fcheck-new)
549 bool CheckNew = false;
550
551 /// The HLSL root signature version for dxil.
552 llvm::dxbc::RootSignatureVersion HLSLRootSigVer =
553 llvm::dxbc::RootSignatureVersion::V1_1;
554
555 /// The HLSL root signature that will be used to overide the root signature
556 /// used for the shader entry point.
558
559 // Indicates if the wasm-opt binary must be ignored in the case of a
560 // WebAssembly target.
561 bool NoWasmOpt = false;
562
563 /// Atomic code-generation options.
564 /// These flags are set directly from the command-line options.
565 bool AtomicRemoteMemory = false;
568
569 LangOptions();
570
571 /// Set language defaults for the given input language and
572 /// language standard in the given LangOptions object.
573 ///
574 /// \param Opts - The LangOptions object to set up.
575 /// \param Lang - The input language.
576 /// \param T - The target triple.
577 /// \param Includes - If the language requires extra headers to be implicitly
578 /// included, they will be appended to this list.
579 /// \param LangStd - The input language standard.
580 static void
581 setLangDefaults(LangOptions &Opts, Language Lang, const llvm::Triple &T,
582 std::vector<std::string> &Includes,
584
585 // Define accessors/mutators for language options of enumeration type.
586#define LANGOPT(Name, Bits, Default, Compatibility, Description)
587#define ENUM_LANGOPT(Name, Type, Bits, Default, Compatibility, Description) \
588 Type get##Name() const { return static_cast<Type>(Name); } \
589 void set##Name(Type Value) { \
590 assert(static_cast<unsigned>(Value) < (1u << Bits)); \
591 Name = static_cast<unsigned>(Value); \
592 }
593#include "clang/Basic/LangOptions.def"
594
595 /// Are we compiling a module?
596 bool isCompilingModule() const {
597 return getCompilingModule() != CMK_None;
598 }
599
600 /// Are we compiling a module implementation?
602 return !isCompilingModule() && !ModuleName.empty();
603 }
604
605 /// Do we need to track the owning module for a local declaration?
607 return isCompilingModule() || ModulesLocalVisibility;
608 }
609
611 return getSignedOverflowBehavior() == SOB_Defined;
612 }
613
616 !ObjCSubscriptingLegacyRuntime;
617 }
618
619 bool isCompatibleWithMSVC(MSVCMajorVersion MajorVersion) const {
620 return MSCompatibilityVersion >= MajorVersion * 100000U;
621 }
622
625 return false;
627 return true;
629 }
630
631 /// Reset all of the options that are not considered when building a
632 /// module.
634
635 /// Is this a libc/libm function that is no longer recognized as a
636 /// builtin because a -fno-builtin-* option has been specified?
637 bool isNoBuiltinFunc(StringRef Name) const;
638
639 /// True if any ObjC types may have non-trivial lifetime qualifiers.
641 return ObjCAutoRefCount || ObjCWeak;
642 }
643
645 return ConvergentFunctions;
646 }
647
648 /// Return true if atomicrmw operations targeting allocations in private
649 /// memory are undefined.
651 // Should be false for OpenMP.
652 // TODO: Should this be true for SYCL?
653 return OpenCL || CUDA;
654 }
655
656 /// Return the OpenCL C or C++ version as a VersionTuple.
657 VersionTuple getOpenCLVersionTuple() const;
658
659 /// Return the OpenCL version that kernel language is compatible with
660 unsigned getOpenCLCompatibleVersion() const;
661
662 /// Return the OpenCL C or C++ for OpenCL language name and version
663 /// as a string.
664 std::string getOpenCLVersionString() const;
665
666 /// Returns true if functions without prototypes or functions with an
667 /// identifier list (aka K&R C functions) are not allowed.
669 return CPlusPlus || C23 || DisableKNRFunctions;
670 }
671
672 /// Returns true if implicit function declarations are allowed in the current
673 /// language mode.
675 return !requiresStrictPrototypes() && !OpenCL;
676 }
677
678 /// Returns true if the language supports calling the 'atexit' function.
679 bool hasAtExit() const { return !(OpenMP && OpenMPIsTargetDevice); }
680
681 /// Returns true if implicit int is part of the language requirements.
682 bool isImplicitIntRequired() const { return !CPlusPlus && !C99; }
683
684 /// Returns true if implicit int is supported at all.
685 bool isImplicitIntAllowed() const { return !CPlusPlus && !C23; }
686
687 /// Check if return address signing is enabled.
688 bool hasSignReturnAddress() const {
689 return getSignReturnAddressScope() != SignReturnAddressScopeKind::None;
690 }
691
692 /// Check if return address signing uses AKey.
694 return getSignReturnAddressKey() == SignReturnAddressKeyKind::AKey;
695 }
696
697 /// Check if leaf functions are also signed.
699 return getSignReturnAddressScope() == SignReturnAddressScopeKind::All;
700 }
701
702 bool isSYCL() const { return SYCLIsDevice || SYCLIsHost; }
703
705 return getDefaultVisibilityExportMapping() !=
707 }
708
710 return getDefaultVisibilityExportMapping() ==
712 }
713
715 return getDefaultVisibilityExportMapping() ==
717 }
718
720 return getGlobalAllocationFunctionVisibility() !=
722 }
723
725 return getGlobalAllocationFunctionVisibility() ==
727 }
728
730 return getGlobalAllocationFunctionVisibility() ==
732 }
733
735 return getGlobalAllocationFunctionVisibility() ==
737 }
738
739 bool allowArrayReturnTypes() const { return HLSL; }
740
741 /// Remap path prefix according to -fmacro-prefix-path option.
743
745 return RoundingMath ? RoundingMode::Dynamic
746 : RoundingMode::NearestTiesToEven;
747 }
748
750 FPExceptionModeKind EM = getFPExceptionMode();
753 return EM;
754 }
755
756 /// True when compiling for an offloading target device.
757 bool isTargetDevice() const {
758 return OpenMPIsTargetDevice || CUDAIsDevice || SYCLIsDevice;
759 }
760};
761
762/// Floating point control options
763class FPOptionsOverride;
765public:
766 // We start by defining the layout.
767 using storage_type = uint32_t;
768
769 using RoundingMode = llvm::RoundingMode;
770
771 static constexpr unsigned StorageBitSize = 8 * sizeof(storage_type);
772
773 // Define a fake option named "First" so that we have a PREVIOUS even for the
774 // real first option.
775 static constexpr storage_type FirstShift = 0, FirstWidth = 0;
776#define FP_OPTION(NAME, TYPE, WIDTH, PREVIOUS) \
777 static constexpr storage_type NAME##Shift = \
778 PREVIOUS##Shift + PREVIOUS##Width; \
779 static constexpr storage_type NAME##Width = WIDTH; \
780 static constexpr storage_type NAME##Mask = ((1 << NAME##Width) - 1) \
781 << NAME##Shift;
782#include "clang/Basic/FPOptions.def"
783
784 static constexpr storage_type TotalWidth = 0
785#define FP_OPTION(NAME, TYPE, WIDTH, PREVIOUS) +WIDTH
786#include "clang/Basic/FPOptions.def"
787 ;
788 static_assert(TotalWidth <= StorageBitSize, "Too short type for FPOptions");
789
790private:
792
793 FPOptionsOverride getChangesSlow(const FPOptions &Base) const;
794
795public:
797 setFPContractMode(LangOptions::FPM_Off);
798 setConstRoundingMode(RoundingMode::Dynamic);
799 setSpecifiedExceptionMode(LangOptions::FPE_Default);
800 }
801 explicit FPOptions(const LangOptions &LO) {
802 Value = 0;
803 // The language fp contract option FPM_FastHonorPragmas has the same effect
804 // as FPM_Fast in frontend. For simplicity, use FPM_Fast uniformly in
805 // frontend.
806 auto LangOptContractMode = LO.getDefaultFPContractMode();
807 if (LangOptContractMode == LangOptions::FPM_FastHonorPragmas)
808 LangOptContractMode = LangOptions::FPM_Fast;
809 setFPContractMode(LangOptContractMode);
810 setRoundingMath(LO.RoundingMath);
811 setConstRoundingMode(LangOptions::RoundingMode::Dynamic);
812 setSpecifiedExceptionMode(LO.getFPExceptionMode());
813 setAllowFPReassociate(LO.AllowFPReassoc);
814 setNoHonorNaNs(LO.NoHonorNaNs);
815 setNoHonorInfs(LO.NoHonorInfs);
816 setNoSignedZero(LO.NoSignedZero);
817 setAllowReciprocal(LO.AllowRecip);
818 setAllowApproxFunc(LO.ApproxFunc);
819 if (getFPContractMode() == LangOptions::FPM_On &&
820 getRoundingMode() == llvm::RoundingMode::Dynamic &&
822 // If the FP settings are set to the "strict" model, then
823 // FENV access is set to true. (ffp-model=strict)
824 setAllowFEnvAccess(true);
825 else
826 setAllowFEnvAccess(LangOptions::FPM_Off);
827 setComplexRange(LO.getComplexRange());
828 }
829
831 return getFPContractMode() == LangOptions::FPM_On;
832 }
834 setFPContractMode(LangOptions::FPM_On);
835 }
836
838 return getFPContractMode() == LangOptions::FPM_Fast;
839 }
841 setFPContractMode(LangOptions::FPM_Fast);
842 }
843
844 bool isFPConstrained() const {
845 return getRoundingMode() != llvm::RoundingMode::NearestTiesToEven ||
847 getAllowFEnvAccess();
848 }
849
851 RoundingMode RM = getConstRoundingMode();
852 if (RM == RoundingMode::Dynamic) {
853 // C23: 7.6.2p3 If the FE_DYNAMIC mode is specified and FENV_ACCESS is
854 // "off", the translator may assume that the default rounding mode is in
855 // effect.
856 if (!getAllowFEnvAccess() && !getRoundingMath())
857 RM = RoundingMode::NearestTiesToEven;
858 }
859 return RM;
860 }
861
863 LangOptions::FPExceptionModeKind EM = getSpecifiedExceptionMode();
865 if (getAllowFEnvAccess())
867 else
869 }
870 return EM;
871 }
872
873 bool operator==(FPOptions other) const { return Value == other.Value; }
874
875 /// Return the default value of FPOptions that's used when trailing
876 /// storage isn't required.
878
881 FPOptions Opts;
882 Opts.Value = Value;
883 return Opts;
884 }
885
886 /// Return difference with the given option set.
888
890
891 // We can define most of the accessors automatically:
892 // TODO: consider enforcing the assertion that value fits within bits
893 // statically.
894#define FP_OPTION(NAME, TYPE, WIDTH, PREVIOUS) \
895 TYPE get##NAME() const { \
896 return static_cast<TYPE>((Value & NAME##Mask) >> NAME##Shift); \
897 } \
898 void set##NAME(TYPE value) { \
899 assert(storage_type(value) < (1u << WIDTH)); \
900 Value = (Value & ~NAME##Mask) | (storage_type(value) << NAME##Shift); \
901 }
902#include "clang/Basic/FPOptions.def"
903 LLVM_DUMP_METHOD void dump();
904};
905
906/// Represents difference between two FPOptions values.
907///
908/// The effect of language constructs changing the set of floating point options
909/// is usually a change of some FP properties while leaving others intact. This
910/// class describes such changes by keeping information about what FP options
911/// are overridden.
912///
913/// The integral set of FP options, described by the class FPOptions, may be
914/// represented as a default FP option set, defined by language standard and
915/// command line options, with the overrides introduced by pragmas.
916///
917/// The is implemented as a value of the new FPOptions plus a mask showing which
918/// fields are actually set in it.
921 FPOptions::storage_type OverrideMask = 0;
922
923public:
924 using RoundingMode = llvm::RoundingMode;
925
926 /// The type suitable for storing values of FPOptionsOverride. Must be twice
927 /// as wide as bit size of FPOption.
928 using storage_type = uint64_t;
929 static_assert(sizeof(storage_type) >= 2 * sizeof(FPOptions::storage_type),
930 "Too short type for FPOptionsOverride");
931
932 /// Bit mask selecting bits of OverrideMask in serialized representation of
933 /// FPOptionsOverride.
935 (static_cast<storage_type>(1) << FPOptions::StorageBitSize) - 1;
936
939 : Options(LO), OverrideMask(OverrideMaskBits) {}
941 : Options(FPO), OverrideMask(OverrideMaskBits) {}
943 : Options(FPO), OverrideMask(Mask) {}
944
945 bool requiresTrailingStorage() const { return OverrideMask != 0; }
946
948 setFPContractModeOverride(LangOptions::FPM_On);
949 }
950
952 setFPContractModeOverride(LangOptions::FPM_Fast);
953 }
954
956 setFPContractModeOverride(LangOptions::FPM_Off);
957 }
958
960 setAllowFPReassociateOverride(!Value);
961 setNoHonorNaNsOverride(!Value);
962 setNoHonorInfsOverride(!Value);
963 setNoSignedZeroOverride(!Value);
964 setAllowReciprocalOverride(!Value);
965 setAllowApproxFuncOverride(!Value);
966 setMathErrnoOverride(Value);
967 if (Value)
968 /* Precise mode implies fp_contract=on and disables ffast-math */
970 else
971 /* Precise mode disabled sets fp_contract=fast and enables ffast-math */
973 }
974
976
978 return (static_cast<storage_type>(Options.getAsOpaqueInt())
980 OverrideMask;
981 }
984 Opts.OverrideMask = I & OverrideMaskBits;
986 return Opts;
987 }
988
991 FPOptions::getFromOpaqueInt((Base.getAsOpaqueInt() & ~OverrideMask) |
992 (Options.getAsOpaqueInt() & OverrideMask));
993 return Result;
994 }
995
997 return applyOverrides(FPOptions(LO));
998 }
999
1000 bool operator==(FPOptionsOverride other) const {
1001 return Options == other.Options && OverrideMask == other.OverrideMask;
1002 }
1003 bool operator!=(FPOptionsOverride other) const { return !(*this == other); }
1004
1005#define FP_OPTION(NAME, TYPE, WIDTH, PREVIOUS) \
1006 bool has##NAME##Override() const { \
1007 return OverrideMask & FPOptions::NAME##Mask; \
1008 } \
1009 TYPE get##NAME##Override() const { \
1010 assert(has##NAME##Override()); \
1011 return Options.get##NAME(); \
1012 } \
1013 void clear##NAME##Override() { \
1014 /* Clear the actual value so that we don't have spurious differences when \
1015 * testing equality. */ \
1016 Options.set##NAME(TYPE(0)); \
1017 OverrideMask &= ~FPOptions::NAME##Mask; \
1018 } \
1019 void set##NAME##Override(TYPE value) { \
1020 Options.set##NAME(value); \
1021 OverrideMask |= FPOptions::NAME##Mask; \
1022 }
1023#include "clang/Basic/FPOptions.def"
1024 LLVM_DUMP_METHOD void dump();
1025};
1028 if (Value == Base.Value)
1029 return FPOptionsOverride();
1030 return getChangesSlow(Base);
1031}
1034 *this = FPO.applyOverrides(*this);
1035}
1036
1037// The three atomic code-generation options.
1038// The canonical (positive) names are:
1039// "remote_memory", "fine_grained_memory", and "ignore_denormal_mode".
1040// In attribute or command-line parsing, a token prefixed with "no_" inverts its
1041// value.
1042enum class AtomicOptionKind {
1043 RemoteMemory, // enable remote memory.
1044 FineGrainedMemory, // enable fine-grained memory.
1045 IgnoreDenormalMode, // ignore floating-point denormals.
1047};
1049struct AtomicOptions {
1050 // Bitfields for each option.
1051 unsigned remote_memory : 1;
1053 unsigned ignore_denormal_mode : 1;
1058 AtomicOptions(const LangOptions &LO)
1059 : remote_memory(LO.AtomicRemoteMemory),
1060 fine_grained_memory(LO.AtomicFineGrainedMemory),
1061 ignore_denormal_mode(LO.AtomicIgnoreDenormalMode) {}
1063 bool getOption(AtomicOptionKind Kind) const {
1064 switch (Kind) {
1066 return remote_memory;
1068 return fine_grained_memory;
1070 return ignore_denormal_mode;
1071 }
1072 llvm_unreachable("Invalid AtomicOptionKind");
1073 }
1075 void setOption(AtomicOptionKind Kind, bool Value) {
1076 switch (Kind) {
1079 return;
1082 return;
1085 return;
1086 }
1087 llvm_unreachable("Invalid AtomicOptionKind");
1088 }
1090 LLVM_DUMP_METHOD void dump() const {
1091 llvm::errs() << "\n remote_memory: " << remote_memory
1092 << "\n fine_grained_memory: " << fine_grained_memory
1093 << "\n ignore_denormal_mode: " << ignore_denormal_mode << "\n";
1094 }
1095};
1096
1097/// Describes the kind of translation unit being processed.
1099 /// The translation unit is a complete translation unit.
1101
1102 /// The translation unit is a prefix to a translation unit, and is
1103 /// not complete.
1104 TU_Prefix,
1105
1106 /// The translation unit is a clang module.
1108
1109 /// The translation unit is a is a complete translation unit that we might
1110 /// incrementally extend later.
1112};
1113
1114} // namespace clang
1115
1116#endif // LLVM_CLANG_BASIC_LANGOPTIONS_H
IndirectLocalPath & Path
enum clang::sema::@1840::IndirectLocalPathEntry::EntryKind Kind
Defines the clang::CommentOptions interface.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
Defines types useful for describing an Objective-C runtime.
Defines the clang::SanitizerKind enum.
Defines the TargetCXXABI class, which abstracts details of the C++ ABI that we're targeting.
Defines the clang::Visibility enumeration and various utility functions.
The base class of CompilerInvocation.
Helper class for holding the data necessary to invoke the compiler.
Represents difference between two FPOptions values.
Definition: LangOptions.h:919
void setAllowFPContractAcrossStatement()
Definition: LangOptions.h:951
static FPOptionsOverride getFromOpaqueInt(storage_type I)
Definition: LangOptions.h:982
bool operator!=(FPOptionsOverride other) const
Definition: LangOptions.h:1003
FPOptionsOverride(FPOptions FPO)
Definition: LangOptions.h:940
LLVM_DUMP_METHOD void dump()
void setFPPreciseEnabled(bool Value)
Definition: LangOptions.h:959
void setAllowFPContractWithinStatement()
Definition: LangOptions.h:947
FPOptionsOverride(FPOptions FPO, FPOptions::storage_type Mask)
Definition: LangOptions.h:942
FPOptions applyOverrides(FPOptions Base)
Definition: LangOptions.h:989
bool operator==(FPOptionsOverride other) const
Definition: LangOptions.h:1000
llvm::RoundingMode RoundingMode
Definition: LangOptions.h:924
static constexpr storage_type OverrideMaskBits
Bit mask selecting bits of OverrideMask in serialized representation of FPOptionsOverride.
Definition: LangOptions.h:934
storage_type getAsOpaqueInt() const
Definition: LangOptions.h:977
FPOptions applyOverrides(const LangOptions &LO)
Definition: LangOptions.h:996
uint64_t storage_type
The type suitable for storing values of FPOptionsOverride.
Definition: LangOptions.h:928
FPOptionsOverride(const LangOptions &LO)
Definition: LangOptions.h:938
bool requiresTrailingStorage() const
Definition: LangOptions.h:945
void applyChanges(FPOptionsOverride FPO)
Definition: LangOptions.h:1032
bool isFPConstrained() const
Definition: LangOptions.h:844
static constexpr storage_type FirstShift
Definition: LangOptions.h:775
FPOptionsOverride getChangesFrom(const FPOptions &Base) const
Return difference with the given option set.
Definition: LangOptions.h:1026
storage_type getAsOpaqueInt() const
Definition: LangOptions.h:879
static constexpr storage_type TotalWidth
Definition: LangOptions.h:784
LangOptions::FPExceptionModeKind getExceptionMode() const
Definition: LangOptions.h:862
FPOptions(const LangOptions &LO)
Definition: LangOptions.h:801
static constexpr storage_type FirstWidth
Definition: LangOptions.h:775
void setAllowFPContractWithinStatement()
Definition: LangOptions.h:833
static FPOptions defaultWithoutTrailingStorage(const LangOptions &LO)
Return the default value of FPOptions that's used when trailing storage isn't required.
static FPOptions getFromOpaqueInt(storage_type Value)
Definition: LangOptions.h:880
bool allowFPContractAcrossStatement() const
Definition: LangOptions.h:837
uint32_t storage_type
Definition: LangOptions.h:767
bool operator==(FPOptions other) const
Definition: LangOptions.h:873
bool allowFPContractWithinStatement() const
Definition: LangOptions.h:830
LLVM_DUMP_METHOD void dump()
void setAllowFPContractAcrossStatement()
Definition: LangOptions.h:840
static constexpr unsigned StorageBitSize
Definition: LangOptions.h:771
llvm::RoundingMode RoundingMode
Definition: LangOptions.h:769
RoundingMode getRoundingMode() const
Definition: LangOptions.h:850
Bitfields of LangOptions, split out from LangOptions in order to ensure that this large collection of...
Definition: LangOptions.h:71
FPEvalMethodKind
Possible float expression evaluation method choices.
Definition: LangOptions.h:239
@ FEM_Extended
Use extended type for fp arithmetic.
Definition: LangOptions.h:245
@ FEM_Double
Use the type double for fp arithmetic.
Definition: LangOptions.h:243
@ FEM_UnsetOnCommandLine
Used only for FE option processing; this is only used to indicate that the user did not specify an ex...
Definition: LangOptions.h:250
@ FEM_Source
Use the declared type for fp arithmetic.
Definition: LangOptions.h:241
@ NonLeaf
Sign the return address of functions that spill LR.
@ All
Sign the return address of all functions,.
@ CMK_None
Not compiling a module interface at all.
Definition: LangOptions.h:118
@ CMK_HeaderUnit
Compiling a module header unit.
Definition: LangOptions.h:124
@ CMK_ModuleMap
Compiling a module from a module map.
Definition: LangOptions.h:121
@ CMK_ModuleInterface
Compiling a C++ modules interface unit.
Definition: LangOptions.h:127
ComplexRangeKind
Controls the various implementations for complex multiplication and.
Definition: LangOptions.h:375
@ CX_Full
Implementation of complex division and multiplication using a call to runtime library functions(gener...
Definition: LangOptions.h:381
@ CX_Basic
Implementation of complex division and multiplication using algebraic formulas at source precision.
Definition: LangOptions.h:400
@ CX_Promoted
Implementation of complex division using algebraic formulas at higher precision.
Definition: LangOptions.h:395
@ CX_None
No range rule is enabled.
Definition: LangOptions.h:403
@ CX_Improved
Implementation of complex division offering an improved handling for overflow in intermediate calcula...
Definition: LangOptions.h:386
@ Swift5_0
Interoperability with the Swift 5.0 runtime.
@ ObjectiveC
Interoperability with the ObjectiveC runtime.
@ Standalone
CoreFoundation does not have any language interoperability.
@ Unspecified
No interoperability ABI has been specified.
@ Swift
Interoperability with the latest known version of the Swift runtime.
@ Swift4_2
Interoperability with the Swift 4.2 runtime.
@ Swift4_1
Interoperability with the Swift 4.1 runtime.
llvm::RoundingMode RoundingMode
Definition: LangOptions.h:77
@ PerThread
Per-thread default stream.
@ ForceProtected
Force protected visibility.
@ BKey
Return address signing uses APIB key.
@ AKey
Return address signing uses APIA key.
@ ExtendTo32
Integer arguments are sign or zero extended to 32/64 bits during default argument promotions.
@ Single
Single Threaded Environment.
@ Integer
Permit vector bitcasts between integer vectors with different numbers of elements but the same total ...
@ ZeroOrIncomplete
Any trailing array member of undefined or 0 size is a FAM.
@ OneZeroOrIncomplete
Any trailing array member of undefined, 0, or 1 size is a FAM.
@ IncompleteOnly
Any trailing array member of undefined size is a FAM.
OverflowPatternExclusionKind
Exclude certain code patterns from being instrumented by arithmetic overflow sanitizers.
Definition: LangOptions.h:317
@ None
Don't exclude any overflow patterns from sanitizers.
Definition: LangOptions.h:319
@ AddUnsignedOverflowTest
if (a + b < a)
Definition: LangOptions.h:325
@ All
Exclude all overflow patterns (below)
Definition: LangOptions.h:321
@ AddSignedOverflowTest
if (a + b < a)
Definition: LangOptions.h:323
@ PostDecrInWhile
while (count–)
Definition: LangOptions.h:329
@ Explicit
map only explicit default visibilities to exported
@ All
map all default visibilities to exported
CompatibilityKind
For ASTs produced with different option value, signifies their level of compatibility.
Definition: LangOptions.h:82
@ NotCompatible
Does affect the construction of the AST in a way that does prevent module interoperability.
@ Compatible
Does affect the construction of the AST in a way that doesn't prevent interoperability (that is,...
@ Benign
Does not affect the construction of the AST in any way (that is, the value can be different between a...
FPExceptionModeKind
Possible floating point exception behavior.
Definition: LangOptions.h:227
@ FPE_Default
Used internally to represent initial unspecified value.
Definition: LangOptions.h:235
@ FPE_Strict
Strictly preserve the floating-point exception semantics.
Definition: LangOptions.h:233
@ FPE_MayTrap
Transformations do not cause new exceptions but may hide some.
Definition: LangOptions.h:231
@ FPE_Ignore
Assume that floating-point exceptions are masked.
Definition: LangOptions.h:229
@ Protected
Override the IR-gen assigned visibility with protected visibility.
@ Hidden
Override the IR-gen assigned visibility with hidden visibility.
ClangABI
Clang versions with different platform ABI conformance.
Definition: LangOptions.h:188
RegisterStaticDestructorsKind
Controls which variables have static destructors registered.
Definition: LangOptions.h:407
@ ThreadLocal
Register static destructors only for thread-local variables.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Definition: LangOptions.h:434
bool isSignReturnAddressWithAKey() const
Check if return address signing uses AKey.
Definition: LangOptions.h:693
void resetNonModularOptions()
Reset all of the options that are not considered when building a module.
Definition: LangOptions.cpp:25
std::vector< std::string > OverflowPatternExclusionValues
Definition: LangOptions.h:534
std::optional< TargetCXXABI::Kind > CXXABI
C++ ABI to compile with, if specified by the frontend through -fc++-abi=.
Definition: LangOptions.h:522
bool AtomicFineGrainedMemory
Definition: LangOptions.h:566
bool isCompatibleWithMSVC(MSVCMajorVersion MajorVersion) const
Definition: LangOptions.h:619
std::vector< std::string > NoBuiltinFuncs
A list of all -fno-builtin-* function names (e.g., memset).
Definition: LangOptions.h:501
std::string ModuleName
The module currently being compiled as specified by -fmodule-name.
Definition: LangOptions.h:482
std::vector< std::string > XRayNeverInstrumentFiles
Paths to the XRay "never instrument" files specifying which objects (files, functions,...
Definition: LangOptions.h:458
FPExceptionModeKind getDefaultExceptionMode() const
Definition: LangOptions.h:749
bool requiresStrictPrototypes() const
Returns true if functions without prototypes or functions with an identifier list (aka K&R C function...
Definition: LangOptions.h:668
bool isImplicitIntAllowed() const
Returns true if implicit int is supported at all.
Definition: LangOptions.h:685
bool isCompilingModuleImplementation() const
Are we compiling a module implementation?
Definition: LangOptions.h:601
bool isNoBuiltinFunc(StringRef Name) const
Is this a libc/libm function that is no longer recognized as a builtin because a -fno-builtin-* optio...
Definition: LangOptions.cpp:51
clang::ObjCRuntime ObjCRuntime
Definition: LangOptions.h:469
CoreFoundationABI CFRuntime
Definition: LangOptions.h:471
std::string getOpenCLVersionString() const
Return the OpenCL C or C++ for OpenCL language name and version as a string.
Definition: LangOptions.cpp:81
unsigned OverflowPatternExclusionMask
Which overflow patterns should be excluded from sanitizer instrumentation.
Definition: LangOptions.h:532
bool IsHeaderFile
Indicates whether the front-end is explicitly told that the input is a header file (i....
Definition: LangOptions.h:526
bool hasDefaultVisibilityExportMapping() const
Definition: LangOptions.h:704
SanitizerSet Sanitize
Set of enabled sanitizers.
Definition: LangOptions.h:440
CommentOptions CommentOpts
Options for parsing comments.
Definition: LangOptions.h:498
bool isExplicitDefaultVisibilityExportMapping() const
Definition: LangOptions.h:709
std::vector< std::string > XRayAlwaysInstrumentFiles
Paths to the XRay "always instrument" files specifying which objects (files, functions,...
Definition: LangOptions.h:452
bool hasAtExit() const
Returns true if the language supports calling the 'atexit' function.
Definition: LangOptions.h:679
bool trackLocalOwningModule() const
Do we need to track the owning module for a local declaration?
Definition: LangOptions.h:606
bool isAllDefaultVisibilityExportMapping() const
Definition: LangOptions.h:714
bool isSubscriptPointerArithmetic() const
Definition: LangOptions.h:614
bool UseTargetPathSeparator
Indicates whether to use target's platform-specific file separator when FILE macro is used and when c...
Definition: LangOptions.h:545
bool isSignedOverflowDefined() const
Definition: LangOptions.h:610
bool hasDefaultGlobalAllocationFunctionVisibility() const
Definition: LangOptions.h:724
bool AtomicIgnoreDenormalMode
Definition: LangOptions.h:567
bool hasGlobalAllocationFunctionVisibility() const
Definition: LangOptions.h:719
VersionTuple getOpenCLVersionTuple() const
Return the OpenCL C or C++ version as a VersionTuple.
Definition: LangOptions.cpp:58
bool implicitFunctionsAllowed() const
Returns true if implicit function declarations are allowed in the current language mode.
Definition: LangOptions.h:674
bool hasSignReturnAddress() const
Check if return address signing is enabled.
Definition: LangOptions.h:688
static void setLangDefaults(LangOptions &Opts, Language Lang, const llvm::Triple &T, std::vector< std::string > &Includes, LangStandard::Kind LangStd=LangStandard::lang_unspecified)
Set language defaults for the given input language and language standard in the given LangOptions obj...
Definition: LangOptions.cpp:91
bool assumeFunctionsAreConvergent() const
Definition: LangOptions.h:644
std::string OMPHostIRFile
Name of the IR file that contains the result of the OpenMP target host code generation.
Definition: LangOptions.h:512
bool allowsNonTrivialObjCLifetimeQualifiers() const
True if any ObjC types may have non-trivial lifetime qualifiers.
Definition: LangOptions.h:640
bool isOverflowPatternExcluded(OverflowPatternExclusionKind Kind) const
Definition: LangOptions.h:623
bool allowArrayReturnTypes() const
Definition: LangOptions.h:739
std::string OverflowHandler
The name of the handler function to be called when -ftrapv is specified.
Definition: LangOptions.h:479
std::string HLSLRootSigOverride
The HLSL root signature that will be used to overide the root signature used for the shader entry poi...
Definition: LangOptions.h:557
bool hasHiddenGlobalAllocationFunctionVisibility() const
Definition: LangOptions.h:734
std::string RandstructSeed
The seed used by the randomize structure layout feature.
Definition: LangOptions.h:537
std::map< std::string, std::string, std::greater< std::string > > MacroPrefixMap
A prefix map for FILE, BASE_FILE and __builtin_FILE().
Definition: LangOptions.h:504
std::vector< std::string > ProfileListFiles
Paths to special case list files specifying which entities (files, functions) should or should not be...
Definition: LangOptions.h:467
void remapPathPrefix(SmallVectorImpl< char > &Path) const
Remap path prefix according to -fmacro-prefix-path option.
Definition: LangOptions.cpp:75
bool isTargetDevice() const
True when compiling for an offloading target device.
Definition: LangOptions.h:757
bool hasProtectedGlobalAllocationFunctionVisibility() const
Definition: LangOptions.h:729
LangStandard::Kind LangStd
The used language standard.
Definition: LangOptions.h:437
llvm::dxbc::RootSignatureVersion HLSLRootSigVer
The HLSL root signature version for dxil.
Definition: LangOptions.h:552
RoundingMode getDefaultRoundingMode() const
Definition: LangOptions.h:744
bool isCompilingModule() const
Are we compiling a module?
Definition: LangOptions.h:596
bool isImplicitIntRequired() const
Returns true if implicit int is part of the language requirements.
Definition: LangOptions.h:682
bool isSignReturnAddressScopeAll() const
Check if leaf functions are also signed.
Definition: LangOptions.h:698
bool isSYCL() const
Definition: LangOptions.h:702
std::string ObjCConstantStringClass
Definition: LangOptions.h:473
std::string CUID
The user provided compilation unit ID, if non-empty.
Definition: LangOptions.h:518
unsigned getOpenCLCompatibleVersion() const
Return the OpenCL version that kernel language is compatible with.
Definition: LangOptions.cpp:65
GPUDefaultStreamKind GPUDefaultStream
The default stream kind used for HIP kernel launching.
Definition: LangOptions.h:529
bool AtomicRemoteMemory
Atomic code-generation options.
Definition: LangOptions.h:565
bool threadPrivateMemoryAtomicsAreUndefined() const
Return true if atomicrmw operations targeting allocations in private memory are undefined.
Definition: LangOptions.h:650
std::vector< std::string > XRayAttrListFiles
Paths to the XRay attribute list files, specifying which objects (files, functions,...
Definition: LangOptions.h:463
bool SanitizeCoverage
Is at least one coverage instrumentation type enabled.
Definition: LangOptions.h:442
std::vector< llvm::Triple > OMPTargetTriples
Triples of the OpenMP targets that the host code codegen should take into account in order to generat...
Definition: LangOptions.h:508
std::vector< std::string > NoSanitizeFiles
Paths to files specifying which objects (files, functions, variables) should not be instrumented.
Definition: LangOptions.h:446
std::string CurrentModule
The name of the current module, of which the main source file is a part.
Definition: LangOptions.h:489
std::vector< std::string > ModuleFeatures
The names of any features to enable in module 'requires' decls in addition to the hard-coded list in ...
Definition: LangOptions.h:495
The basic abstraction for the target Objective-C runtime.
Definition: ObjCRuntime.h:28
bool isSubscriptPointerArithmetic() const
Is subscripting pointer arithmetic?
Definition: ObjCRuntime.h:356
The JSON file list parser is used to communicate input to InstallAPI.
@ OpenCL
Definition: LangStandard.h:65
@ CPlusPlus
Definition: LangStandard.h:55
Language
The language for the input, used to select and validate the language standard and possible actions.
Definition: LangStandard.h:23
@ Result
The result type of a method or function.
MSVtorDispMode
In the Microsoft ABI, this controls the placement of virtual displacement members used to implement v...
Definition: LangOptions.h:37
ShaderStage
Shader programs run in specific pipeline stages.
Definition: LangOptions.h:43
TranslationUnitKind
Describes the kind of translation unit being processed.
Definition: LangOptions.h:1097
@ TU_Incremental
The translation unit is a is a complete translation unit that we might incrementally extend later.
Definition: LangOptions.h:1110
@ TU_Complete
The translation unit is a complete translation unit.
Definition: LangOptions.h:1099
@ TU_ClangModule
The translation unit is a clang module.
Definition: LangOptions.h:1106
@ TU_Prefix
The translation unit is a prefix to a translation unit, and is not complete.
Definition: LangOptions.h:1103
const FunctionProtoType * T
PointerAuthenticationMode
Definition: LangOptions.h:62
AtomicOptionKind
Definition: LangOptions.h:1041
@ None
The alignment was not explicit in code.
Visibility
Describes the different kinds of visibility that a declaration may have.
Definition: Visibility.h:34
unsigned fine_grained_memory
Definition: LangOptions.h:1051
void setOption(AtomicOptionKind Kind, bool Value)
Definition: LangOptions.h:1074
LLVM_DUMP_METHOD void dump() const
Definition: LangOptions.h:1089
unsigned ignore_denormal_mode
Definition: LangOptions.h:1052
bool getOption(AtomicOptionKind Kind) const
Definition: LangOptions.h:1062
Options for controlling comment parsing.