clang 20.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
18#include "clang/Basic/LLVM.h"
24#include "llvm/ADT/FloatingPointMode.h"
25#include "llvm/ADT/StringRef.h"
26#include "llvm/TargetParser/Triple.h"
27#include <optional>
28#include <string>
29#include <vector>
30
31namespace clang {
32
33/// In the Microsoft ABI, this controls the placement of virtual displacement
34/// members used to implement virtual inheritance.
36
37/// Shader programs run in specific pipeline stages.
38/// The order of these values matters, and must be kept in sync with the
39/// Triple Environment enum in llvm::Triple. The ordering is enforced in
40/// static_asserts in Triple.cpp and in clang/Basic/HLSLRuntime.h.
41enum class ShaderStage {
42 Pixel = 0,
43 Vertex,
45 Hull,
46 Domain,
47 Compute,
48 Library,
51 AnyHit,
53 Miss,
55 Mesh,
57 Invalid,
58};
59
60enum class PointerAuthenticationMode : unsigned {
61 None,
62 Strip,
65};
66
67/// Bitfields of LangOptions, split out from LangOptions in order to ensure that
68/// this large collection of bitfields is a trivial class type.
70 friend class CompilerInvocation;
72
73public:
75 using RoundingMode = llvm::RoundingMode;
76
79
80 // Automatic variables live on the stack, and when trivial they're usually
81 // uninitialized because it's undefined behavior to use them without
82 // initializing them.
84
86 // Default C standard behavior.
88
89 // -fwrapv
91
92 // -ftrapv
94 };
95
96 // FIXME: Unify with TUKind.
98 /// Not compiling a module interface at all.
100
101 /// Compiling a module from a module map.
103
104 /// Compiling a module header unit.
106
107 /// Compiling a C++ modules interface unit.
109 };
110
116 };
117
119
128 };
129
131
132 // Corresponds to _MSC_VER
134 MSVC2010 = 1600,
135 MSVC2012 = 1700,
136 MSVC2013 = 1800,
137 MSVC2015 = 1900,
138 MSVC2017 = 1910,
141 MSVC2019 = 1920,
145 };
146
151 // The "default" SYCL version to be used when none is specified on the
152 // frontend command line.
154 };
155
158 HLSL_2015 = 2015,
159 HLSL_2016 = 2016,
160 HLSL_2017 = 2017,
161 HLSL_2018 = 2018,
162 HLSL_2021 = 2021,
163 HLSL_202x = 2029,
164 };
165
166 /// Clang versions with different platform ABI conformance.
167 enum class ClangABI {
168 /// Attempt to be ABI-compatible with code generated by Clang 3.8.x
169 /// (SVN r257626). This causes <1 x long long> to be passed in an
170 /// integer register instead of an SSE register on x64_64.
171 Ver3_8,
172
173 /// Attempt to be ABI-compatible with code generated by Clang 4.0.x
174 /// (SVN r291814). This causes move operations to be ignored when
175 /// determining whether a class type can be passed or returned directly.
176 Ver4,
177
178 /// Attempt to be ABI-compatible with code generated by Clang 6.0.x
179 /// (SVN r321711). This causes determination of whether a type is
180 /// standard-layout to ignore collisions between empty base classes
181 /// and between base classes and member subobjects, which affects
182 /// whether we reuse base class tail padding in some ABIs.
183 Ver6,
184
185 /// Attempt to be ABI-compatible with code generated by Clang 7.0.x
186 /// (SVN r338536). This causes alignof (C++) and _Alignof (C11) to be
187 /// compatible with __alignof (i.e., return the preferred alignment)
188 /// rather than returning the required alignment.
189 Ver7,
190
191 /// Attempt to be ABI-compatible with code generated by Clang 9.0.x
192 /// (SVN r351319). This causes vectors of __int128 to be passed in memory
193 /// instead of passing in multiple scalar registers on x86_64 on Linux and
194 /// NetBSD.
195 Ver9,
196
197 /// Attempt to be ABI-compatible with code generated by Clang 11.0.x
198 /// (git 2e10b7a39b93). This causes clang to pass unions with a 256-bit
199 /// vector member on the stack instead of using registers, to not properly
200 /// mangle substitutions for template names in some cases, and to mangle
201 /// declaration template arguments without a cast to the parameter type
202 /// even when that can lead to mangling collisions.
203 Ver11,
204
205 /// Attempt to be ABI-compatible with code generated by Clang 12.0.x
206 /// (git 8e464dd76bef). This causes clang to mangle lambdas within
207 /// global-scope inline variables incorrectly.
208 Ver12,
209
210 /// Attempt to be ABI-compatible with code generated by Clang 14.0.x.
211 /// This causes clang to:
212 /// - mangle dependent nested names incorrectly.
213 /// - make trivial only those defaulted copy constructors with a
214 /// parameter-type-list equivalent to the parameter-type-list of an
215 /// implicit declaration.
216 Ver14,
217
218 /// Attempt to be ABI-compatible with code generated by Clang 15.0.x.
219 /// This causes clang to:
220 /// - Reverse the implementation for DR692, DR1395 and DR1432.
221 /// - pack non-POD members of packed structs.
222 /// - consider classes with defaulted special member functions non-pod.
223 Ver15,
224
225 /// Attempt to be ABI-compatible with code generated by Clang 17.0.x.
226 /// This causes clang to revert some fixes to its implementation of the
227 /// Itanium name mangling scheme, with the consequence that overloaded
228 /// function templates are mangled the same if they differ only by:
229 /// - constraints
230 /// - whether a non-type template parameter has a deduced type
231 /// - the parameter list of a template template parameter
232 Ver17,
233
234 /// Attempt to be ABI-compatible with code generated by Clang 18.0.x.
235 /// This causes clang to revert some fixes to the mangling of lambdas
236 /// in the initializers of members of local classes.
237 Ver18,
238
239 /// Conform to the underlying platform's C and C++ ABIs as closely
240 /// as we can.
241 Latest
242 };
243
244 enum class CoreFoundationABI {
245 /// No interoperability ABI has been specified
247 /// CoreFoundation does not have any language interoperability
249 /// Interoperability with the ObjectiveC runtime
251 /// Interoperability with the latest known version of the Swift runtime
252 Swift,
253 /// Interoperability with the Swift 5.0 runtime
254 Swift5_0,
255 /// Interoperability with the Swift 4.2 runtime
256 Swift4_2,
257 /// Interoperability with the Swift 4.1 runtime
258 Swift4_1,
259 };
260
262 // Disable the floating point pragma
264
265 // Enable the floating point pragma
267
268 // Aggressively fuse FP ops (E.g. FMA) disregarding pragmas.
270
271 // Aggressively fuse FP ops and honor pragmas.
273 };
274
275 /// Possible floating point exception behavior.
277 /// Assume that floating-point exceptions are masked.
279 /// Transformations do not cause new exceptions but may hide some.
281 /// Strictly preserve the floating-point exception semantics.
283 /// Used internally to represent initial unspecified value.
285 };
286
287 /// Possible float expression evaluation method choices.
289 /// The evaluation method cannot be determined or is inconsistent for this
290 /// target.
292 /// Use the declared type for fp arithmetic.
294 /// Use the type double for fp arithmetic.
296 /// Use extended type for fp arithmetic.
298 /// Used only for FE option processing; this is only used to indicate that
299 /// the user did not specify an explicit evaluation method on the command
300 /// line and so the target should be queried for its default evaluation
301 /// method instead.
303 };
304
306
307 /// Possible exception handling behavior.
309
311 /// Permit no implicit vector bitcasts.
312 None,
313 /// Permit vector bitcasts between integer vectors with different numbers
314 /// of elements but the same total bit-width.
315 Integer,
316 /// Permit vector bitcasts between all vectors with the same total
317 /// bit-width.
318 All,
319 };
320
322 // All vector compares produce scalars except vector pixel and vector bool.
323 // The types vector pixel and vector bool return vector results.
324 Mixed,
325 // All vector compares produce vector results as in GCC.
326 GCC,
327 // All vector compares produce scalars as in XL.
328 XL,
329 // Default clang behaviour.
330 Default = Mixed,
331 };
332
334 /// No signing for any function.
335 None,
336 /// Sign the return address of functions that spill LR.
337 NonLeaf,
338 /// Sign the return address of all functions,
339 All
340 };
341
343 /// Return address signing uses APIA key.
344 AKey,
345 /// Return address signing uses APIB key.
346 BKey
347 };
348
349 enum class ThreadModelKind {
350 /// POSIX Threads.
351 POSIX,
352 /// Single Threaded Environment.
353 Single
354 };
355
356 enum class ExtendArgsKind {
357 /// Integer arguments are sign or zero extended to 32/64 bits
358 /// during default argument promotions.
361 };
362
364 /// Legacy default stream
365 Legacy,
366 /// Per-thread default stream
367 PerThread,
368 };
369
370 /// Exclude certain code patterns from being instrumented by arithmetic
371 /// overflow sanitizers
373 /// Don't exclude any overflow patterns from sanitizers
374 None = 1 << 0,
375 /// Exclude all overflow patterns (below)
376 All = 1 << 1,
377 /// if (a + b < a)
379 /// -1UL
381 /// while (count--)
383 };
384
386 None,
387 /// map only explicit default visibilities to exported
388 Explicit,
389 /// map all default visibilities to exported
390 All,
391 };
392
394 /// Force hidden visibility
396 /// Force protected visibility
398 /// Force default visibility
400 /// Don't alter the visibility
401 Source,
402 };
403
405 /// Keep the IR-gen assigned visibility.
406 Keep,
407 /// Override the IR-gen assigned visibility with default visibility.
408 Default,
409 /// Override the IR-gen assigned visibility with hidden visibility.
410 Hidden,
411 /// Override the IR-gen assigned visibility with protected visibility.
412 Protected,
413 };
414
416 /// Any trailing array member is a FAM.
417 Default = 0,
418 /// Any trailing array member of undefined, 0, or 1 size is a FAM.
420 /// Any trailing array member of undefined or 0 size is a FAM.
422 /// Any trailing array member of undefined size is a FAM.
423 IncompleteOnly = 3,
424 };
425
426 /// Controls the various implementations for complex multiplication and
427 // division.
429 /// Implementation of complex division and multiplication using a call to
430 /// runtime library functions(generally the case, but the BE might
431 /// sometimes replace the library call if it knows enough about the
432 /// potential range of the inputs). Overflow and non-finite values are
433 /// handled by the library implementation. This is the default value.
435
436 /// Implementation of complex division offering an improved handling
437 /// for overflow in intermediate calculations with no special handling for
438 /// NaN and infinite values.
440
441 /// Implementation of complex division using algebraic formulas at
442 /// higher precision. Overflow is handled. Non-finite values are handled in
443 /// some cases. If the target hardware does not have native support for a
444 /// higher precision data type, an implementation for the complex operation
445 /// will be used to provide improved guards against intermediate overflow,
446 /// but overflow and underflow may still occur in some cases. NaN and
447 /// infinite values are not handled.
449
450 /// Implementation of complex division and multiplication using
451 /// algebraic formulas at source precision. No special handling to avoid
452 /// overflow. NaN and infinite values are not handled.
454
455 /// No range rule is enabled.
456 CX_None
457 };
458
459 // Define simple language options (with no accessors).
460#define LANGOPT(Name, Bits, Default, Description) unsigned Name : Bits;
461#define ENUM_LANGOPT(Name, Type, Bits, Default, Description)
462#include "clang/Basic/LangOptions.def"
463
464protected:
465 // Define language options of enumeration type. These are private, and will
466 // have accessors (below).
467#define LANGOPT(Name, Bits, Default, Description)
468#define ENUM_LANGOPT(Name, Type, Bits, Default, Description) \
469 LLVM_PREFERRED_TYPE(Type) \
470 unsigned Name : Bits;
471#include "clang/Basic/LangOptions.def"
472};
473
474/// Keeps track of the various options that can be
475/// enabled, which controls the dialect of C or C++ that is accepted.
477public:
478 /// The used language standard.
480
481 /// Set of enabled sanitizers.
483 /// Is at least one coverage instrumentation type enabled.
484 bool SanitizeCoverage = false;
485
486 /// Paths to files specifying which objects
487 /// (files, functions, variables) should not be instrumented.
488 std::vector<std::string> NoSanitizeFiles;
489
490 /// Paths to the XRay "always instrument" files specifying which
491 /// objects (files, functions, variables) should be imbued with the XRay
492 /// "always instrument" attribute.
493 /// WARNING: This is a deprecated field and will go away in the future.
494 std::vector<std::string> XRayAlwaysInstrumentFiles;
495
496 /// Paths to the XRay "never instrument" files specifying which
497 /// objects (files, functions, variables) should be imbued with the XRay
498 /// "never instrument" attribute.
499 /// WARNING: This is a deprecated field and will go away in the future.
500 std::vector<std::string> XRayNeverInstrumentFiles;
501
502 /// Paths to the XRay attribute list files, specifying which objects
503 /// (files, functions, variables) should be imbued with the appropriate XRay
504 /// attribute(s).
505 std::vector<std::string> XRayAttrListFiles;
506
507 /// Paths to special case list files specifying which entities
508 /// (files, functions) should or should not be instrumented.
509 std::vector<std::string> ProfileListFiles;
510
512
514
516
517 /// The name of the handler function to be called when -ftrapv is
518 /// specified.
519 ///
520 /// If none is specified, abort (GCC-compatible behaviour).
521 std::string OverflowHandler;
522
523 /// The module currently being compiled as specified by -fmodule-name.
524 std::string ModuleName;
525
526 /// The name of the current module, of which the main source file
527 /// is a part. If CompilingModule is set, we are compiling the interface
528 /// of this module, otherwise we are compiling an implementation file of
529 /// it. This starts as ModuleName in case -fmodule-name is provided and
530 /// changes during compilation to reflect the current module.
531 std::string CurrentModule;
532
533 /// The names of any features to enable in module 'requires' decls
534 /// in addition to the hard-coded list in Module.cpp and the target features.
535 ///
536 /// This list is sorted.
537 std::vector<std::string> ModuleFeatures;
538
539 /// Options for parsing comments.
541
542 /// A list of all -fno-builtin-* function names (e.g., memset).
543 std::vector<std::string> NoBuiltinFuncs;
544
545 /// A prefix map for __FILE__, __BASE_FILE__ and __builtin_FILE().
546 std::map<std::string, std::string, std::greater<std::string>> MacroPrefixMap;
547
548 /// Triples of the OpenMP targets that the host code codegen should
549 /// take into account in order to generate accurate offloading descriptors.
550 std::vector<llvm::Triple> OMPTargetTriples;
551
552 /// Name of the IR file that contains the result of the OpenMP target
553 /// host code generation.
554 std::string OMPHostIRFile;
555
556 /// The user provided compilation unit ID, if non-empty. This is used to
557 /// externalize static variables which is needed to support accessing static
558 /// device variables in host code for single source offloading languages
559 /// like CUDA/HIP.
560 std::string CUID;
561
562 /// C++ ABI to compile with, if specified by the frontend through -fc++-abi=.
563 /// This overrides the default ABI used by the target.
564 std::optional<TargetCXXABI::Kind> CXXABI;
565
566 /// Indicates whether the front-end is explicitly told that the
567 /// input is a header file (i.e. -x c-header).
568 bool IsHeaderFile = false;
569
570 /// The default stream kind used for HIP kernel launching.
572
573 /// Which overflow patterns should be excluded from sanitizer instrumentation
575
576 std::vector<std::string> OverflowPatternExclusionValues;
577
578 /// The seed used by the randomize structure layout feature.
579 std::string RandstructSeed;
580
581 /// Indicates whether to use target's platform-specific file separator when
582 /// __FILE__ macro is used and when concatenating filename with directory or
583 /// to use build environment environment's platform-specific file separator.
584 ///
585 /// The plaform-specific path separator is the backslash(\‍) for Windows and
586 /// forward slash (/) elsewhere.
588
589 // Indicates whether we should keep all nullptr checks for pointers
590 // received as a result of a standard operator new (-fcheck-new)
591 bool CheckNew = false;
592
593 // In OpenACC mode, contains a user provided override for the _OPENACC macro.
594 // This exists so that we can override the macro value and test our incomplete
595 // implementation on real-world examples.
597
598 // Indicates if the wasm-opt binary must be ignored in the case of a
599 // WebAssembly target.
600 bool NoWasmOpt = false;
601
602 LangOptions();
603
604 /// Set language defaults for the given input language and
605 /// language standard in the given LangOptions object.
606 ///
607 /// \param Opts - The LangOptions object to set up.
608 /// \param Lang - The input language.
609 /// \param T - The target triple.
610 /// \param Includes - If the language requires extra headers to be implicitly
611 /// included, they will be appended to this list.
612 /// \param LangStd - The input language standard.
613 static void
614 setLangDefaults(LangOptions &Opts, Language Lang, const llvm::Triple &T,
615 std::vector<std::string> &Includes,
617
618 // Define accessors/mutators for language options of enumeration type.
619#define LANGOPT(Name, Bits, Default, Description)
620#define ENUM_LANGOPT(Name, Type, Bits, Default, Description) \
621 Type get##Name() const { return static_cast<Type>(Name); } \
622 void set##Name(Type Value) { Name = static_cast<unsigned>(Value); }
623#include "clang/Basic/LangOptions.def"
624
625 /// Are we compiling a module?
626 bool isCompilingModule() const {
627 return getCompilingModule() != CMK_None;
628 }
629
630 /// Are we compiling a module implementation?
632 return !isCompilingModule() && !ModuleName.empty();
633 }
634
635 /// Do we need to track the owning module for a local declaration?
637 return isCompilingModule() || ModulesLocalVisibility;
638 }
639
641 return getSignedOverflowBehavior() == SOB_Defined;
642 }
643
646 !ObjCSubscriptingLegacyRuntime;
647 }
648
649 bool isCompatibleWithMSVC(MSVCMajorVersion MajorVersion) const {
650 return MSCompatibilityVersion >= MajorVersion * 100000U;
651 }
652
655 return false;
657 return true;
659 }
660
661 /// Reset all of the options that are not considered when building a
662 /// module.
664
665 /// Is this a libc/libm function that is no longer recognized as a
666 /// builtin because a -fno-builtin-* option has been specified?
667 bool isNoBuiltinFunc(StringRef Name) const;
668
669 /// True if any ObjC types may have non-trivial lifetime qualifiers.
671 return ObjCAutoRefCount || ObjCWeak;
672 }
673
675 return ConvergentFunctions;
676 }
677
678 /// Return the OpenCL C or C++ version as a VersionTuple.
679 VersionTuple getOpenCLVersionTuple() const;
680
681 /// Return the OpenCL version that kernel language is compatible with
682 unsigned getOpenCLCompatibleVersion() const;
683
684 /// Return the OpenCL C or C++ for OpenCL language name and version
685 /// as a string.
686 std::string getOpenCLVersionString() const;
687
688 /// Returns true if functions without prototypes or functions with an
689 /// identifier list (aka K&R C functions) are not allowed.
691 return CPlusPlus || C23 || DisableKNRFunctions;
692 }
693
694 /// Returns true if implicit function declarations are allowed in the current
695 /// language mode.
697 return !requiresStrictPrototypes() && !OpenCL;
698 }
699
700 /// Returns true if the language supports calling the 'atexit' function.
701 bool hasAtExit() const { return !(OpenMP && OpenMPIsTargetDevice); }
702
703 /// Returns true if implicit int is part of the language requirements.
704 bool isImplicitIntRequired() const { return !CPlusPlus && !C99; }
705
706 /// Returns true if implicit int is supported at all.
707 bool isImplicitIntAllowed() const { return !CPlusPlus && !C23; }
708
709 /// Check if return address signing is enabled.
710 bool hasSignReturnAddress() const {
711 return getSignReturnAddressScope() != SignReturnAddressScopeKind::None;
712 }
713
714 /// Check if return address signing uses AKey.
716 return getSignReturnAddressKey() == SignReturnAddressKeyKind::AKey;
717 }
718
719 /// Check if leaf functions are also signed.
721 return getSignReturnAddressScope() == SignReturnAddressScopeKind::All;
722 }
723
724 bool hasSjLjExceptions() const {
725 return getExceptionHandling() == ExceptionHandlingKind::SjLj;
726 }
727
728 bool hasSEHExceptions() const {
729 return getExceptionHandling() == ExceptionHandlingKind::WinEH;
730 }
731
732 bool hasDWARFExceptions() const {
733 return getExceptionHandling() == ExceptionHandlingKind::DwarfCFI;
734 }
735
736 bool hasWasmExceptions() const {
737 return getExceptionHandling() == ExceptionHandlingKind::Wasm;
738 }
739
740 bool isSYCL() const { return SYCLIsDevice || SYCLIsHost; }
741
743 return getDefaultVisibilityExportMapping() !=
745 }
746
748 return getDefaultVisibilityExportMapping() ==
750 }
751
753 return getDefaultVisibilityExportMapping() ==
755 }
756
758 return getGlobalAllocationFunctionVisibility() !=
760 }
761
763 return getGlobalAllocationFunctionVisibility() ==
765 }
766
768 return getGlobalAllocationFunctionVisibility() ==
770 }
771
773 return getGlobalAllocationFunctionVisibility() ==
775 }
776
777 /// Remap path prefix according to -fmacro-prefix-path option.
779
781 return RoundingMath ? RoundingMode::Dynamic
782 : RoundingMode::NearestTiesToEven;
783 }
784
786 FPExceptionModeKind EM = getFPExceptionMode();
789 return EM;
790 }
791};
792
793/// Floating point control options
794class FPOptionsOverride;
796public:
797 // We start by defining the layout.
798 using storage_type = uint32_t;
799
800 using RoundingMode = llvm::RoundingMode;
801
802 static constexpr unsigned StorageBitSize = 8 * sizeof(storage_type);
803
804 // Define a fake option named "First" so that we have a PREVIOUS even for the
805 // real first option.
806 static constexpr storage_type FirstShift = 0, FirstWidth = 0;
807#define OPTION(NAME, TYPE, WIDTH, PREVIOUS) \
808 static constexpr storage_type NAME##Shift = \
809 PREVIOUS##Shift + PREVIOUS##Width; \
810 static constexpr storage_type NAME##Width = WIDTH; \
811 static constexpr storage_type NAME##Mask = ((1 << NAME##Width) - 1) \
812 << NAME##Shift;
813#include "clang/Basic/FPOptions.def"
814
815 static constexpr storage_type TotalWidth = 0
816#define OPTION(NAME, TYPE, WIDTH, PREVIOUS) +WIDTH
817#include "clang/Basic/FPOptions.def"
818 ;
819 static_assert(TotalWidth <= StorageBitSize, "Too short type for FPOptions");
820
821private:
823
824 FPOptionsOverride getChangesSlow(const FPOptions &Base) const;
825
826public:
828 setFPContractMode(LangOptions::FPM_Off);
829 setConstRoundingMode(RoundingMode::Dynamic);
830 setSpecifiedExceptionMode(LangOptions::FPE_Default);
831 }
832 explicit FPOptions(const LangOptions &LO) {
833 Value = 0;
834 // The language fp contract option FPM_FastHonorPragmas has the same effect
835 // as FPM_Fast in frontend. For simplicity, use FPM_Fast uniformly in
836 // frontend.
837 auto LangOptContractMode = LO.getDefaultFPContractMode();
838 if (LangOptContractMode == LangOptions::FPM_FastHonorPragmas)
839 LangOptContractMode = LangOptions::FPM_Fast;
840 setFPContractMode(LangOptContractMode);
841 setRoundingMath(LO.RoundingMath);
842 setConstRoundingMode(LangOptions::RoundingMode::Dynamic);
843 setSpecifiedExceptionMode(LO.getFPExceptionMode());
844 setAllowFPReassociate(LO.AllowFPReassoc);
845 setNoHonorNaNs(LO.NoHonorNaNs);
846 setNoHonorInfs(LO.NoHonorInfs);
847 setNoSignedZero(LO.NoSignedZero);
848 setAllowReciprocal(LO.AllowRecip);
849 setAllowApproxFunc(LO.ApproxFunc);
850 if (getFPContractMode() == LangOptions::FPM_On &&
851 getRoundingMode() == llvm::RoundingMode::Dynamic &&
853 // If the FP settings are set to the "strict" model, then
854 // FENV access is set to true. (ffp-model=strict)
855 setAllowFEnvAccess(true);
856 else
857 setAllowFEnvAccess(LangOptions::FPM_Off);
858 setComplexRange(LO.getComplexRange());
859 }
860
862 return getFPContractMode() == LangOptions::FPM_On;
863 }
865 setFPContractMode(LangOptions::FPM_On);
866 }
867
869 return getFPContractMode() == LangOptions::FPM_Fast;
870 }
872 setFPContractMode(LangOptions::FPM_Fast);
873 }
874
875 bool isFPConstrained() const {
876 return getRoundingMode() != llvm::RoundingMode::NearestTiesToEven ||
878 getAllowFEnvAccess();
879 }
880
882 RoundingMode RM = getConstRoundingMode();
883 if (RM == RoundingMode::Dynamic) {
884 // C23: 7.6.2p3 If the FE_DYNAMIC mode is specified and FENV_ACCESS is
885 // "off", the translator may assume that the default rounding mode is in
886 // effect.
887 if (!getAllowFEnvAccess() && !getRoundingMath())
888 RM = RoundingMode::NearestTiesToEven;
889 }
890 return RM;
891 }
892
894 LangOptions::FPExceptionModeKind EM = getSpecifiedExceptionMode();
896 if (getAllowFEnvAccess())
898 else
900 }
901 return EM;
902 }
903
904 bool operator==(FPOptions other) const { return Value == other.Value; }
905
906 /// Return the default value of FPOptions that's used when trailing
907 /// storage isn't required.
909
912 FPOptions Opts;
913 Opts.Value = Value;
914 return Opts;
915 }
916
917 /// Return difference with the given option set.
919
921
922 // We can define most of the accessors automatically:
923#define OPTION(NAME, TYPE, WIDTH, PREVIOUS) \
924 TYPE get##NAME() const { \
925 return static_cast<TYPE>((Value & NAME##Mask) >> NAME##Shift); \
926 } \
927 void set##NAME(TYPE value) { \
928 Value = (Value & ~NAME##Mask) | (storage_type(value) << NAME##Shift); \
929 }
930#include "clang/Basic/FPOptions.def"
931 LLVM_DUMP_METHOD void dump();
932};
933
934/// Represents difference between two FPOptions values.
935///
936/// The effect of language constructs changing the set of floating point options
937/// is usually a change of some FP properties while leaving others intact. This
938/// class describes such changes by keeping information about what FP options
939/// are overridden.
940///
941/// The integral set of FP options, described by the class FPOptions, may be
942/// represented as a default FP option set, defined by language standard and
943/// command line options, with the overrides introduced by pragmas.
944///
945/// The is implemented as a value of the new FPOptions plus a mask showing which
946/// fields are actually set in it.
949 FPOptions::storage_type OverrideMask = 0;
950
951public:
952 using RoundingMode = llvm::RoundingMode;
953
954 /// The type suitable for storing values of FPOptionsOverride. Must be twice
955 /// as wide as bit size of FPOption.
956 using storage_type = uint64_t;
957 static_assert(sizeof(storage_type) >= 2 * sizeof(FPOptions::storage_type),
958 "Too short type for FPOptionsOverride");
959
960 /// Bit mask selecting bits of OverrideMask in serialized representation of
961 /// FPOptionsOverride.
963 (static_cast<storage_type>(1) << FPOptions::StorageBitSize) - 1;
964
967 : Options(LO), OverrideMask(OverrideMaskBits) {}
969 : Options(FPO), OverrideMask(OverrideMaskBits) {}
971 : Options(FPO), OverrideMask(Mask) {}
972
973 bool requiresTrailingStorage() const { return OverrideMask != 0; }
974
976 setFPContractModeOverride(LangOptions::FPM_On);
977 }
978
980 setFPContractModeOverride(LangOptions::FPM_Fast);
981 }
982
984 setFPContractModeOverride(LangOptions::FPM_Off);
985 }
986
988 setAllowFPReassociateOverride(!Value);
989 setNoHonorNaNsOverride(!Value);
990 setNoHonorInfsOverride(!Value);
991 setNoSignedZeroOverride(!Value);
992 setAllowReciprocalOverride(!Value);
993 setAllowApproxFuncOverride(!Value);
994 setMathErrnoOverride(Value);
995 if (Value)
996 /* Precise mode implies fp_contract=on and disables ffast-math */
998 else
999 /* Precise mode disabled sets fp_contract=fast and enables ffast-math */
1001 }
1002
1004
1006 return (static_cast<storage_type>(Options.getAsOpaqueInt())
1008 OverrideMask;
1009 }
1011 FPOptionsOverride Opts;
1012 Opts.OverrideMask = I & OverrideMaskBits;
1014 return Opts;
1015 }
1016
1019 FPOptions::getFromOpaqueInt((Base.getAsOpaqueInt() & ~OverrideMask) |
1020 (Options.getAsOpaqueInt() & OverrideMask));
1021 return Result;
1022 }
1023
1025 return applyOverrides(FPOptions(LO));
1026 }
1027
1028 bool operator==(FPOptionsOverride other) const {
1029 return Options == other.Options && OverrideMask == other.OverrideMask;
1030 }
1031 bool operator!=(FPOptionsOverride other) const { return !(*this == other); }
1032
1033#define OPTION(NAME, TYPE, WIDTH, PREVIOUS) \
1034 bool has##NAME##Override() const { \
1035 return OverrideMask & FPOptions::NAME##Mask; \
1036 } \
1037 TYPE get##NAME##Override() const { \
1038 assert(has##NAME##Override()); \
1039 return Options.get##NAME(); \
1040 } \
1041 void clear##NAME##Override() { \
1042 /* Clear the actual value so that we don't have spurious differences when \
1043 * testing equality. */ \
1044 Options.set##NAME(TYPE(0)); \
1045 OverrideMask &= ~FPOptions::NAME##Mask; \
1046 } \
1047 void set##NAME##Override(TYPE value) { \
1048 Options.set##NAME(value); \
1049 OverrideMask |= FPOptions::NAME##Mask; \
1050 }
1051#include "clang/Basic/FPOptions.def"
1052 LLVM_DUMP_METHOD void dump();
1053};
1056 if (Value == Base.Value)
1057 return FPOptionsOverride();
1058 return getChangesSlow(Base);
1059}
1062 *this = FPO.applyOverrides(*this);
1063}
1064
1065/// Describes the kind of translation unit being processed.
1067 /// The translation unit is a complete translation unit.
1069
1070 /// The translation unit is a prefix to a translation unit, and is
1071 /// not complete.
1072 TU_Prefix,
1073
1074 /// The translation unit is a clang module.
1076
1077 /// The translation unit is a is a complete translation unit that we might
1078 /// incrementally extend later.
1080};
1081
1082} // namespace clang
1083
1084#endif // LLVM_CLANG_BASIC_LANGOPTIONS_H
IndirectLocalPath & Path
enum clang::sema::@1656::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:947
void setAllowFPContractAcrossStatement()
Definition: LangOptions.h:979
static FPOptionsOverride getFromOpaqueInt(storage_type I)
Definition: LangOptions.h:1010
bool operator!=(FPOptionsOverride other) const
Definition: LangOptions.h:1031
FPOptionsOverride(FPOptions FPO)
Definition: LangOptions.h:968
LLVM_DUMP_METHOD void dump()
void setFPPreciseEnabled(bool Value)
Definition: LangOptions.h:987
void setAllowFPContractWithinStatement()
Definition: LangOptions.h:975
FPOptionsOverride(FPOptions FPO, FPOptions::storage_type Mask)
Definition: LangOptions.h:970
FPOptions applyOverrides(FPOptions Base)
Definition: LangOptions.h:1017
bool operator==(FPOptionsOverride other) const
Definition: LangOptions.h:1028
llvm::RoundingMode RoundingMode
Definition: LangOptions.h:952
static constexpr storage_type OverrideMaskBits
Bit mask selecting bits of OverrideMask in serialized representation of FPOptionsOverride.
Definition: LangOptions.h:962
storage_type getAsOpaqueInt() const
Definition: LangOptions.h:1005
FPOptions applyOverrides(const LangOptions &LO)
Definition: LangOptions.h:1024
uint64_t storage_type
The type suitable for storing values of FPOptionsOverride.
Definition: LangOptions.h:956
FPOptionsOverride(const LangOptions &LO)
Definition: LangOptions.h:966
bool requiresTrailingStorage() const
Definition: LangOptions.h:973
void applyChanges(FPOptionsOverride FPO)
Definition: LangOptions.h:1060
bool isFPConstrained() const
Definition: LangOptions.h:875
static constexpr storage_type FirstShift
Definition: LangOptions.h:806
FPOptionsOverride getChangesFrom(const FPOptions &Base) const
Return difference with the given option set.
Definition: LangOptions.h:1054
storage_type getAsOpaqueInt() const
Definition: LangOptions.h:910
static constexpr storage_type TotalWidth
Definition: LangOptions.h:815
LangOptions::FPExceptionModeKind getExceptionMode() const
Definition: LangOptions.h:893
FPOptions(const LangOptions &LO)
Definition: LangOptions.h:832
static constexpr storage_type FirstWidth
Definition: LangOptions.h:806
void setAllowFPContractWithinStatement()
Definition: LangOptions.h:864
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:911
bool allowFPContractAcrossStatement() const
Definition: LangOptions.h:868
uint32_t storage_type
Definition: LangOptions.h:798
bool operator==(FPOptions other) const
Definition: LangOptions.h:904
bool allowFPContractWithinStatement() const
Definition: LangOptions.h:861
LLVM_DUMP_METHOD void dump()
void setAllowFPContractAcrossStatement()
Definition: LangOptions.h:871
static constexpr unsigned StorageBitSize
Definition: LangOptions.h:802
llvm::RoundingMode RoundingMode
Definition: LangOptions.h:800
RoundingMode getRoundingMode() const
Definition: LangOptions.h:881
Bitfields of LangOptions, split out from LangOptions in order to ensure that this large collection of...
Definition: LangOptions.h:69
@ 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:99
@ CMK_HeaderUnit
Compiling a module header unit.
Definition: LangOptions.h:105
@ CMK_ModuleMap
Compiling a module from a module map.
Definition: LangOptions.h:102
@ CMK_ModuleInterface
Compiling a C++ modules interface unit.
Definition: LangOptions.h:108
ComplexRangeKind
Controls the various implementations for complex multiplication and.
Definition: LangOptions.h:428
@ CX_Full
Implementation of complex division and multiplication using a call to runtime library functions(gener...
Definition: LangOptions.h:434
@ CX_Basic
Implementation of complex division and multiplication using algebraic formulas at source precision.
Definition: LangOptions.h:453
@ CX_Promoted
Implementation of complex division using algebraic formulas at higher precision.
Definition: LangOptions.h:448
@ CX_None
No range rule is enabled.
Definition: LangOptions.h:456
@ CX_Improved
Implementation of complex division offering an improved handling for overflow in intermediate calcula...
Definition: LangOptions.h:439
@ 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:75
@ 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.
FPEvalMethodKind
Possible float expression evaluation method choices.
Definition: LangOptions.h:288
@ FEM_Extended
Use extended type for fp arithmetic.
Definition: LangOptions.h:297
@ FEM_Double
Use the type double for fp arithmetic.
Definition: LangOptions.h:295
@ FEM_Indeterminable
The evaluation method cannot be determined or is inconsistent for this target.
Definition: LangOptions.h:291
@ 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:302
@ FEM_Source
Use the declared type for fp arithmetic.
Definition: LangOptions.h:293
@ 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:372
@ None
Don't exclude any overflow patterns from sanitizers.
Definition: LangOptions.h:374
@ AddOverflowTest
if (a + b < a)
Definition: LangOptions.h:378
@ All
Exclude all overflow patterns (below)
Definition: LangOptions.h:376
@ PostDecrInWhile
while (count–)
Definition: LangOptions.h:382
ExceptionHandlingKind
Possible exception handling behavior.
Definition: LangOptions.h:308
@ Explicit
map only explicit default visibilities to exported
@ All
map all default visibilities to exported
FPExceptionModeKind
Possible floating point exception behavior.
Definition: LangOptions.h:276
@ FPE_Default
Used internally to represent initial unspecified value.
Definition: LangOptions.h:284
@ FPE_Strict
Strictly preserve the floating-point exception semantics.
Definition: LangOptions.h:282
@ FPE_MayTrap
Transformations do not cause new exceptions but may hide some.
Definition: LangOptions.h:280
@ FPE_Ignore
Assume that floating-point exceptions are masked.
Definition: LangOptions.h:278
@ 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:167
@ Ver6
Attempt to be ABI-compatible with code generated by Clang 6.0.x (SVN r321711).
@ Ver18
Attempt to be ABI-compatible with code generated by Clang 18.0.x.
@ Ver4
Attempt to be ABI-compatible with code generated by Clang 4.0.x (SVN r291814).
@ Ver14
Attempt to be ABI-compatible with code generated by Clang 14.0.x.
@ Ver11
Attempt to be ABI-compatible with code generated by Clang 11.0.x (git 2e10b7a39b93).
@ Ver15
Attempt to be ABI-compatible with code generated by Clang 15.0.x.
@ Ver17
Attempt to be ABI-compatible with code generated by Clang 17.0.x.
@ Ver7
Attempt to be ABI-compatible with code generated by Clang 7.0.x (SVN r338536).
@ Latest
Conform to the underlying platform's C and C++ ABIs as closely as we can.
@ Ver3_8
Attempt to be ABI-compatible with code generated by Clang 3.8.x (SVN r257626).
@ Ver12
Attempt to be ABI-compatible with code generated by Clang 12.0.x (git 8e464dd76bef).
@ Ver9
Attempt to be ABI-compatible with code generated by Clang 9.0.x (SVN r351319).
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Definition: LangOptions.h:476
bool isSignReturnAddressWithAKey() const
Check if return address signing uses AKey.
Definition: LangOptions.h:715
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:576
bool hasWasmExceptions() const
Definition: LangOptions.h:736
std::optional< TargetCXXABI::Kind > CXXABI
C++ ABI to compile with, if specified by the frontend through -fc++-abi=.
Definition: LangOptions.h:564
bool isCompatibleWithMSVC(MSVCMajorVersion MajorVersion) const
Definition: LangOptions.h:649
std::vector< std::string > NoBuiltinFuncs
A list of all -fno-builtin-* function names (e.g., memset).
Definition: LangOptions.h:543
std::string ModuleName
The module currently being compiled as specified by -fmodule-name.
Definition: LangOptions.h:524
std::vector< std::string > XRayNeverInstrumentFiles
Paths to the XRay "never instrument" files specifying which objects (files, functions,...
Definition: LangOptions.h:500
FPExceptionModeKind getDefaultExceptionMode() const
Definition: LangOptions.h:785
bool requiresStrictPrototypes() const
Returns true if functions without prototypes or functions with an identifier list (aka K&R C function...
Definition: LangOptions.h:690
bool isImplicitIntAllowed() const
Returns true if implicit int is supported at all.
Definition: LangOptions.h:707
bool isCompilingModuleImplementation() const
Are we compiling a module implementation?
Definition: LangOptions.h:631
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:49
clang::ObjCRuntime ObjCRuntime
Definition: LangOptions.h:511
CoreFoundationABI CFRuntime
Definition: LangOptions.h:513
std::string getOpenCLVersionString() const
Return the OpenCL C or C++ for OpenCL language name and version as a string.
Definition: LangOptions.cpp:79
bool hasSjLjExceptions() const
Definition: LangOptions.h:724
unsigned OverflowPatternExclusionMask
Which overflow patterns should be excluded from sanitizer instrumentation.
Definition: LangOptions.h:574
bool IsHeaderFile
Indicates whether the front-end is explicitly told that the input is a header file (i....
Definition: LangOptions.h:568
bool hasDefaultVisibilityExportMapping() const
Definition: LangOptions.h:742
SanitizerSet Sanitize
Set of enabled sanitizers.
Definition: LangOptions.h:482
CommentOptions CommentOpts
Options for parsing comments.
Definition: LangOptions.h:540
bool isExplicitDefaultVisibilityExportMapping() const
Definition: LangOptions.h:747
std::vector< std::string > XRayAlwaysInstrumentFiles
Paths to the XRay "always instrument" files specifying which objects (files, functions,...
Definition: LangOptions.h:494
bool hasAtExit() const
Returns true if the language supports calling the 'atexit' function.
Definition: LangOptions.h:701
bool trackLocalOwningModule() const
Do we need to track the owning module for a local declaration?
Definition: LangOptions.h:636
bool isAllDefaultVisibilityExportMapping() const
Definition: LangOptions.h:752
bool isSubscriptPointerArithmetic() const
Definition: LangOptions.h:644
bool UseTargetPathSeparator
Indicates whether to use target's platform-specific file separator when FILE macro is used and when c...
Definition: LangOptions.h:587
bool isSignedOverflowDefined() const
Definition: LangOptions.h:640
bool hasDefaultGlobalAllocationFunctionVisibility() const
Definition: LangOptions.h:762
bool hasGlobalAllocationFunctionVisibility() const
Definition: LangOptions.h:757
VersionTuple getOpenCLVersionTuple() const
Return the OpenCL C or C++ version as a VersionTuple.
Definition: LangOptions.cpp:56
bool implicitFunctionsAllowed() const
Returns true if implicit function declarations are allowed in the current language mode.
Definition: LangOptions.h:696
bool hasSignReturnAddress() const
Check if return address signing is enabled.
Definition: LangOptions.h:710
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:89
bool hasDWARFExceptions() const
Definition: LangOptions.h:732
bool assumeFunctionsAreConvergent() const
Definition: LangOptions.h:674
std::string OMPHostIRFile
Name of the IR file that contains the result of the OpenMP target host code generation.
Definition: LangOptions.h:554
bool allowsNonTrivialObjCLifetimeQualifiers() const
True if any ObjC types may have non-trivial lifetime qualifiers.
Definition: LangOptions.h:670
bool isOverflowPatternExcluded(OverflowPatternExclusionKind Kind) const
Definition: LangOptions.h:653
std::string OverflowHandler
The name of the handler function to be called when -ftrapv is specified.
Definition: LangOptions.h:521
bool hasHiddenGlobalAllocationFunctionVisibility() const
Definition: LangOptions.h:772
std::string RandstructSeed
The seed used by the randomize structure layout feature.
Definition: LangOptions.h:579
std::map< std::string, std::string, std::greater< std::string > > MacroPrefixMap
A prefix map for FILE, BASE_FILE and __builtin_FILE().
Definition: LangOptions.h:546
std::vector< std::string > ProfileListFiles
Paths to special case list files specifying which entities (files, functions) should or should not be...
Definition: LangOptions.h:509
void remapPathPrefix(SmallVectorImpl< char > &Path) const
Remap path prefix according to -fmacro-prefix-path option.
Definition: LangOptions.cpp:73
bool hasProtectedGlobalAllocationFunctionVisibility() const
Definition: LangOptions.h:767
LangStandard::Kind LangStd
The used language standard.
Definition: LangOptions.h:479
RoundingMode getDefaultRoundingMode() const
Definition: LangOptions.h:780
bool isCompilingModule() const
Are we compiling a module?
Definition: LangOptions.h:626
bool isImplicitIntRequired() const
Returns true if implicit int is part of the language requirements.
Definition: LangOptions.h:704
bool hasSEHExceptions() const
Definition: LangOptions.h:728
std::string OpenACCMacroOverride
Definition: LangOptions.h:596
bool isSignReturnAddressScopeAll() const
Check if leaf functions are also signed.
Definition: LangOptions.h:720
bool isSYCL() const
Definition: LangOptions.h:740
std::string ObjCConstantStringClass
Definition: LangOptions.h:515
std::string CUID
The user provided compilation unit ID, if non-empty.
Definition: LangOptions.h:560
unsigned getOpenCLCompatibleVersion() const
Return the OpenCL version that kernel language is compatible with.
Definition: LangOptions.cpp:63
GPUDefaultStreamKind GPUDefaultStream
The default stream kind used for HIP kernel launching.
Definition: LangOptions.h:571
std::vector< std::string > XRayAttrListFiles
Paths to the XRay attribute list files, specifying which objects (files, functions,...
Definition: LangOptions.h:505
bool SanitizeCoverage
Is at least one coverage instrumentation type enabled.
Definition: LangOptions.h:484
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:550
std::vector< std::string > NoSanitizeFiles
Paths to files specifying which objects (files, functions, variables) should not be instrumented.
Definition: LangOptions.h:488
std::string CurrentModule
The name of the current module, of which the main source file is a part.
Definition: LangOptions.h:531
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:537
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:66
@ CPlusPlus
Definition: LangStandard.h:56
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:35
ShaderStage
Shader programs run in specific pipeline stages.
Definition: LangOptions.h:41
TranslationUnitKind
Describes the kind of translation unit being processed.
Definition: LangOptions.h:1065
@ TU_Incremental
The translation unit is a is a complete translation unit that we might incrementally extend later.
Definition: LangOptions.h:1078
@ TU_Complete
The translation unit is a complete translation unit.
Definition: LangOptions.h:1067
@ TU_ClangModule
The translation unit is a clang module.
Definition: LangOptions.h:1074
@ TU_Prefix
The translation unit is a prefix to a translation unit, and is not complete.
Definition: LangOptions.h:1071
const FunctionProtoType * T
PointerAuthenticationMode
Definition: LangOptions.h:60
@ None
The alignment was not explicit in code.
Visibility
Describes the different kinds of visibility that a declaration may have.
Definition: Visibility.h:34
Options for controlling comment parsing.