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
17#include "clang/Basic/CommentOptions.h"
18#include "clang/Basic/LLVM.h"
19#include "clang/Basic/LangStandard.h"
20#include "clang/Basic/ObjCRuntime.h"
21#include "clang/Basic/Sanitizers.h"
22#include "clang/Basic/TargetCXXABI.h"
23#include "clang/Basic/Visibility.h"
24#include "llvm/ADT/FloatingPointMode.h"
25#include "llvm/ADT/StringRef.h"
26#include "llvm/ADT/Triple.h"
27#include <string>
28#include <vector>
29
30namespace clang {
31
32/// Bitfields of LangOptions, split out from LangOptions in order to ensure that
33/// this large collection of bitfields is a trivial class type.
34class LangOptionsBase {
35 friend class CompilerInvocation;
36
37public:
38 // Define simple language options (with no accessors).
39#define LANGOPT(Name, Bits, Default, Description) unsigned Name : Bits;
40#define ENUM_LANGOPT(Name, Type, Bits, Default, Description)
41#include "clang/Basic/LangOptions.def"
42
43protected:
44 // Define language options of enumeration type. These are private, and will
45 // have accessors (below).
46#define LANGOPT(Name, Bits, Default, Description)
47#define ENUM_LANGOPT(Name, Type, Bits, Default, Description) \
48 unsigned Name : Bits;
49#include "clang/Basic/LangOptions.def"
50};
51
52/// In the Microsoft ABI, this controls the placement of virtual displacement
53/// members used to implement virtual inheritance.
54enum class MSVtorDispMode { Never, ForVBaseOverride, ForVFTable };
55
56/// Keeps track of the various options that can be
57/// enabled, which controls the dialect of C or C++ that is accepted.
58class LangOptions : public LangOptionsBase {
59public:
60 using Visibility = clang::Visibility;
61 using RoundingMode = llvm::RoundingMode;
62
63 enum GCMode { NonGC, GCOnly, HybridGC };
64 enum StackProtectorMode { SSPOff, SSPOn, SSPStrong, SSPReq };
65
66 // Automatic variables live on the stack, and when trivial they're usually
67 // uninitialized because it's undefined behavior to use them without
68 // initializing them.
69 enum class TrivialAutoVarInitKind { Uninitialized, Zero, Pattern };
70
71 enum SignedOverflowBehaviorTy {
72 // Default C standard behavior.
73 SOB_Undefined,
74
75 // -fwrapv
76 SOB_Defined,
77
78 // -ftrapv
79 SOB_Trapping
80 };
81
82 // FIXME: Unify with TUKind.
83 enum CompilingModuleKind {
84 /// Not compiling a module interface at all.
85 CMK_None,
86
87 /// Compiling a module from a module map.
88 CMK_ModuleMap,
89
90 /// Compiling a module from a list of header files.
91 CMK_HeaderModule,
92
93 /// Compiling a C++ modules TS module interface unit.
94 CMK_ModuleInterface,
95 };
96
97 enum PragmaMSPointersToMembersKind {
98 PPTMK_BestCase,
99 PPTMK_FullGeneralitySingleInheritance,
100 PPTMK_FullGeneralityMultipleInheritance,
101 PPTMK_FullGeneralityVirtualInheritance
102 };
103
104 using MSVtorDispMode = clang::MSVtorDispMode;
105
106 enum DefaultCallingConvention {
107 DCC_None,
108 DCC_CDecl,
109 DCC_FastCall,
110 DCC_StdCall,
111 DCC_VectorCall,
112 DCC_RegCall
113 };
114
115 enum AddrSpaceMapMangling { ASMM_Target, ASMM_On, ASMM_Off };
116
117 // Corresponds to _MSC_VER
118 enum MSVCMajorVersion {
119 MSVC2010 = 1600,
120 MSVC2012 = 1700,
121 MSVC2013 = 1800,
122 MSVC2015 = 1900,
123 MSVC2017 = 1910,
124 MSVC2017_5 = 1912,
125 MSVC2017_7 = 1914,
126 MSVC2019 = 1920,
127 MSVC2019_8 = 1928,
128 };
129
130 enum SYCLMajorVersion {
131 SYCL_None,
132 SYCL_2017,
133 };
134
135 /// Clang versions with different platform ABI conformance.
136 enum class ClangABI {
137 /// Attempt to be ABI-compatible with code generated by Clang 3.8.x
138 /// (SVN r257626). This causes <1 x long long> to be passed in an
139 /// integer register instead of an SSE register on x64_64.
140 Ver3_8,
141
142 /// Attempt to be ABI-compatible with code generated by Clang 4.0.x
143 /// (SVN r291814). This causes move operations to be ignored when
144 /// determining whether a class type can be passed or returned directly.
145 Ver4,
146
147 /// Attempt to be ABI-compatible with code generated by Clang 6.0.x
148 /// (SVN r321711). This causes determination of whether a type is
149 /// standard-layout to ignore collisions between empty base classes
150 /// and between base classes and member subobjects, which affects
151 /// whether we reuse base class tail padding in some ABIs.
152 Ver6,
153
154 /// Attempt to be ABI-compatible with code generated by Clang 7.0.x
155 /// (SVN r338536). This causes alignof (C++) and _Alignof (C11) to be
156 /// compatible with __alignof (i.e., return the preferred alignment)
157 /// rather than returning the required alignment.
158 Ver7,
159
160 /// Attempt to be ABI-compatible with code generated by Clang 9.0.x
161 /// (SVN r351319). This causes vectors of __int128 to be passed in memory
162 /// instead of passing in multiple scalar registers on x86_64 on Linux and
163 /// NetBSD.
164 Ver9,
165
166 /// Attempt to be ABI-compatible with code generated by Clang 11.0.x
167 /// (git 2e10b7a39b93). This causes clang to pass unions with a 256-bit
168 /// vector member on the stack instead of using registers, to not properly
169 /// mangle substitutions for template names in some cases, and to mangle
170 /// declaration template arguments without a cast to the parameter type
171 /// even when that can lead to mangling collisions.
172 Ver11,
173
174 /// Conform to the underlying platform's C and C++ ABIs as closely
175 /// as we can.
176 Latest
177 };
178
179 enum class CoreFoundationABI {
180 /// No interoperability ABI has been specified
181 Unspecified,
182 /// CoreFoundation does not have any language interoperability
183 Standalone,
184 /// Interoperability with the ObjectiveC runtime
185 ObjectiveC,
186 /// Interoperability with the latest known version of the Swift runtime
187 Swift,
188 /// Interoperability with the Swift 5.0 runtime
189 Swift5_0,
190 /// Interoperability with the Swift 4.2 runtime
191 Swift4_2,
192 /// Interoperability with the Swift 4.1 runtime
193 Swift4_1,
194 };
195
196 enum FPModeKind {
197 // Disable the floating point pragma
198 FPM_Off,
199
200 // Enable the floating point pragma
201 FPM_On,
202
203 // Aggressively fuse FP ops (E.g. FMA) disregarding pragmas.
204 FPM_Fast,
205
206 // Aggressively fuse FP ops and honor pragmas.
207 FPM_FastHonorPragmas
208 };
209
210 /// Alias for RoundingMode::NearestTiesToEven.
211 static constexpr unsigned FPR_ToNearest =
212 static_cast<unsigned>(llvm::RoundingMode::NearestTiesToEven);
213
214 /// Possible floating point exception behavior.
215 enum FPExceptionModeKind {
216 /// Assume that floating-point exceptions are masked.
217 FPE_Ignore,
218 /// Transformations do not cause new exceptions but may hide some.
219 FPE_MayTrap,
220 /// Strictly preserve the floating-point exception semantics.
221 FPE_Strict
222 };
223
224 /// Possible exception handling behavior.
225 enum class ExceptionHandlingKind { None, SjLj, WinEH, DwarfCFI, Wasm };
226
227 enum class LaxVectorConversionKind {
228 /// Permit no implicit vector bitcasts.
229 None,
230 /// Permit vector bitcasts between integer vectors with different numbers
231 /// of elements but the same total bit-width.
232 Integer,
233 /// Permit vector bitcasts between all vectors with the same total
234 /// bit-width.
235 All,
236 };
237
238 enum class SignReturnAddressScopeKind {
239 /// No signing for any function.
240 None,
241 /// Sign the return address of functions that spill LR.
242 NonLeaf,
243 /// Sign the return address of all functions,
244 All
245 };
246
247 enum class SignReturnAddressKeyKind {
248 /// Return address signing uses APIA key.
249 AKey,
250 /// Return address signing uses APIB key.
251 BKey
252 };
253
254 enum class ThreadModelKind {
255 /// POSIX Threads.
256 POSIX,
257 /// Single Threaded Environment.
258 Single
259 };
260
261public:
262 /// The used language standard.
263 LangStandard::Kind LangStd;
264
265 /// Set of enabled sanitizers.
266 SanitizerSet Sanitize;
267
268 /// Paths to files specifying which objects
269 /// (files, functions, variables) should not be instrumented.
270 std::vector<std::string> NoSanitizeFiles;
271
272 /// Paths to the XRay "always instrument" files specifying which
273 /// objects (files, functions, variables) should be imbued with the XRay
274 /// "always instrument" attribute.
275 /// WARNING: This is a deprecated field and will go away in the future.
276 std::vector<std::string> XRayAlwaysInstrumentFiles;
277
278 /// Paths to the XRay "never instrument" files specifying which
279 /// objects (files, functions, variables) should be imbued with the XRay
280 /// "never instrument" attribute.
281 /// WARNING: This is a deprecated field and will go away in the future.
282 std::vector<std::string> XRayNeverInstrumentFiles;
283
284 /// Paths to the XRay attribute list files, specifying which objects
285 /// (files, functions, variables) should be imbued with the appropriate XRay
286 /// attribute(s).
287 std::vector<std::string> XRayAttrListFiles;
288
289 /// Paths to special case list files specifying which entities
290 /// (files, functions) should or should not be instrumented.
291 std::vector<std::string> ProfileListFiles;
292
293 clang::ObjCRuntime ObjCRuntime;
294
295 CoreFoundationABI CFRuntime = CoreFoundationABI::Unspecified;
296
297 std::string ObjCConstantStringClass;
298
299 /// The name of the handler function to be called when -ftrapv is
300 /// specified.
301 ///
302 /// If none is specified, abort (GCC-compatible behaviour).
303 std::string OverflowHandler;
304
305 /// The module currently being compiled as specified by -fmodule-name.
306 std::string ModuleName;
307
308 /// The name of the current module, of which the main source file
309 /// is a part. If CompilingModule is set, we are compiling the interface
310 /// of this module, otherwise we are compiling an implementation file of
311 /// it. This starts as ModuleName in case -fmodule-name is provided and
312 /// changes during compilation to reflect the current module.
313 std::string CurrentModule;
314
315 /// The names of any features to enable in module 'requires' decls
316 /// in addition to the hard-coded list in Module.cpp and the target features.
317 ///
318 /// This list is sorted.
319 std::vector<std::string> ModuleFeatures;
320
321 /// Options for parsing comments.
322 CommentOptions CommentOpts;
323
324 /// A list of all -fno-builtin-* function names (e.g., memset).
325 std::vector<std::string> NoBuiltinFuncs;
326
327 /// Triples of the OpenMP targets that the host code codegen should
328 /// take into account in order to generate accurate offloading descriptors.
329 std::vector<llvm::Triple> OMPTargetTriples;
330
331 /// Name of the IR file that contains the result of the OpenMP target
332 /// host code generation.
333 std::string OMPHostIRFile;
334
335 /// The user provided compilation unit ID, if non-empty. This is used to
336 /// externalize static variables which is needed to support accessing static
337 /// device variables in host code for single source offloading languages
338 /// like CUDA/HIP.
339 std::string CUID;
340
341 /// C++ ABI to compile with, if specified by the frontend through -fc++-abi=.
342 /// This overrides the default ABI used by the target.
343 llvm::Optional<TargetCXXABI::Kind> CXXABI;
344
345 /// Indicates whether the front-end is explicitly told that the
346 /// input is a header file (i.e. -x c-header).
347 bool IsHeaderFile = false;
348
349 LangOptions();
350
351 // Define accessors/mutators for language options of enumeration type.
352#define LANGOPT(Name, Bits, Default, Description)
353#define ENUM_LANGOPT(Name, Type, Bits, Default, Description) \
354 Type get##Name() const { return static_cast<Type>(Name); } \
355 void set##Name(Type Value) { Name = static_cast<unsigned>(Value); }
356#include "clang/Basic/LangOptions.def"
357
358 /// Are we compiling a module interface (.cppm or module map)?
359 bool isCompilingModule() const {
360 return getCompilingModule() != CMK_None;
361 }
362
363 /// Do we need to track the owning module for a local declaration?
364 bool trackLocalOwningModule() const {
365 return isCompilingModule() || ModulesLocalVisibility;
366 }
367
368 bool isSignedOverflowDefined() const {
369 return getSignedOverflowBehavior() == SOB_Defined;
370 }
371
372 bool isSubscriptPointerArithmetic() const {
373 return ObjCRuntime.isSubscriptPointerArithmetic() &&
374 !ObjCSubscriptingLegacyRuntime;
375 }
376
377 bool isCompatibleWithMSVC(MSVCMajorVersion MajorVersion) const {
378 return MSCompatibilityVersion >= MajorVersion * 100000U;
379 }
380
381 /// Reset all of the options that are not considered when building a
382 /// module.
383 void resetNonModularOptions();
384
385 /// Is this a libc/libm function that is no longer recognized as a
386 /// builtin because a -fno-builtin-* option has been specified?
387 bool isNoBuiltinFunc(StringRef Name) const;
388
389 /// True if any ObjC types may have non-trivial lifetime qualifiers.
390 bool allowsNonTrivialObjCLifetimeQualifiers() const {
391 return ObjCAutoRefCount || ObjCWeak;
392 }
393
394 bool assumeFunctionsAreConvergent() const {
395 return ConvergentFunctions;
396 }
397
398 /// Return the OpenCL C or C++ version as a VersionTuple.
399 VersionTuple getOpenCLVersionTuple() const;
400
401 /// Check if return address signing is enabled.
402 bool hasSignReturnAddress() const {
403 return getSignReturnAddressScope() != SignReturnAddressScopeKind::None;
404 }
405
406 /// Check if return address signing uses AKey.
407 bool isSignReturnAddressWithAKey() const {
408 return getSignReturnAddressKey() == SignReturnAddressKeyKind::AKey;
409 }
410
411 /// Check if leaf functions are also signed.
412 bool isSignReturnAddressScopeAll() const {
413 return getSignReturnAddressScope() == SignReturnAddressScopeKind::All;
414 }
415
416 bool hasSjLjExceptions() const {
417 return getExceptionHandling() == ExceptionHandlingKind::SjLj;
418 }
419
420 bool hasSEHExceptions() const {
421 return getExceptionHandling() == ExceptionHandlingKind::WinEH;
422 }
423
424 bool hasDWARFExceptions() const {
425 return getExceptionHandling() == ExceptionHandlingKind::DwarfCFI;
426 }
427
428 bool hasWasmExceptions() const {
429 return getExceptionHandling() == ExceptionHandlingKind::Wasm;
430 }
431};
432
433/// Floating point control options
434class FPOptionsOverride;
435class FPOptions {
436public:
437 // We start by defining the layout.
438 using storage_type = uint16_t;
439
440 using RoundingMode = llvm::RoundingMode;
441
442 static constexpr unsigned StorageBitSize = 8 * sizeof(storage_type);
443
444 // Define a fake option named "First" so that we have a PREVIOUS even for the
445 // real first option.
446 static constexpr storage_type FirstShift = 0, FirstWidth = 0;
447#define OPTION(NAME, TYPE, WIDTH, PREVIOUS) \
448 static constexpr storage_type NAME##Shift = \
449 PREVIOUS##Shift + PREVIOUS##Width; \
450 static constexpr storage_type NAME##Width = WIDTH; \
451 static constexpr storage_type NAME##Mask = ((1 << NAME##Width) - 1) \
452 << NAME##Shift;
453#include "clang/Basic/FPOptions.def"
454
455 static constexpr storage_type TotalWidth = 0
456#define OPTION(NAME, TYPE, WIDTH, PREVIOUS) +WIDTH
457#include "clang/Basic/FPOptions.def"
458 ;
459 static_assert(TotalWidth <= StorageBitSize, "Too short type for FPOptions");
460
461private:
462 storage_type Value;
463
464public:
465 FPOptions() : Value(0) {
466 setFPContractMode(LangOptions::FPM_Off);
467 setRoundingMode(static_cast<RoundingMode>(LangOptions::FPR_ToNearest));
468 setFPExceptionMode(LangOptions::FPE_Ignore);
469 }
470 explicit FPOptions(const LangOptions &LO) {
471 Value = 0;
472 // The language fp contract option FPM_FastHonorPragmas has the same effect
473 // as FPM_Fast in frontend. For simplicity, use FPM_Fast uniformly in
474 // frontend.
475 auto LangOptContractMode = LO.getDefaultFPContractMode();
476 if (LangOptContractMode == LangOptions::FPM_FastHonorPragmas)
477 LangOptContractMode = LangOptions::FPM_Fast;
478 setFPContractMode(LangOptContractMode);
479 setRoundingMode(LO.getFPRoundingMode());
480 setFPExceptionMode(LO.getFPExceptionMode());
481 setAllowFPReassociate(LO.AllowFPReassoc);
482 setNoHonorNaNs(LO.NoHonorNaNs);
483 setNoHonorInfs(LO.NoHonorInfs);
484 setNoSignedZero(LO.NoSignedZero);
485 setAllowReciprocal(LO.AllowRecip);
486 setAllowApproxFunc(LO.ApproxFunc);
487 if (getFPContractMode() == LangOptions::FPM_On &&
488 getRoundingMode() == llvm::RoundingMode::Dynamic &&
489 getFPExceptionMode() == LangOptions::FPE_Strict)
490 // If the FP settings are set to the "strict" model, then
491 // FENV access is set to true. (ffp-model=strict)
492 setAllowFEnvAccess(true);
493 else
494 setAllowFEnvAccess(LangOptions::FPM_Off);
495 }
496
497 bool allowFPContractWithinStatement() const {
498 return getFPContractMode() == LangOptions::FPM_On;
499 }
500 void setAllowFPContractWithinStatement() {
501 setFPContractMode(LangOptions::FPM_On);
502 }
503
504 bool allowFPContractAcrossStatement() const {
505 return getFPContractMode() == LangOptions::FPM_Fast;
506 }
507 void setAllowFPContractAcrossStatement() {
508 setFPContractMode(LangOptions::FPM_Fast);
509 }
510
511 bool isFPConstrained() const {
512 return getRoundingMode() != llvm::RoundingMode::NearestTiesToEven ||
513 getFPExceptionMode() != LangOptions::FPE_Ignore ||
514 getAllowFEnvAccess();
515 }
516
517 bool operator==(FPOptions other) const { return Value == other.Value; }
518
519 /// Return the default value of FPOptions that's used when trailing
520 /// storage isn't required.
521 static FPOptions defaultWithoutTrailingStorage(const LangOptions &LO);
522
523 storage_type getAsOpaqueInt() const { return Value; }
524 static FPOptions getFromOpaqueInt(storage_type Value) {
525 FPOptions Opts;
526 Opts.Value = Value;
527 return Opts;
528 }
529
530 // We can define most of the accessors automatically:
531#define OPTION(NAME, TYPE, WIDTH, PREVIOUS) \
532 TYPE get##NAME() const { \
533 return static_cast<TYPE>((Value & NAME##Mask) >> NAME##Shift); \
534 } \
535 void set##NAME(TYPE value) { \
536 Value = (Value & ~NAME##Mask) | (storage_type(value) << NAME##Shift); \
537 }
538#include "clang/Basic/FPOptions.def"
539 LLVM_DUMP_METHOD void dump();
540};
541
542/// Represents difference between two FPOptions values.
543///
544/// The effect of language constructs changing the set of floating point options
545/// is usually a change of some FP properties while leaving others intact. This
546/// class describes such changes by keeping information about what FP options
547/// are overridden.
548///
549/// The integral set of FP options, described by the class FPOptions, may be
550/// represented as a default FP option set, defined by language standard and
551/// command line options, with the overrides introduced by pragmas.
552///
553/// The is implemented as a value of the new FPOptions plus a mask showing which
554/// fields are actually set in it.
555class FPOptionsOverride {
556 FPOptions Options = FPOptions::getFromOpaqueInt(0);
557 FPOptions::storage_type OverrideMask = 0;
558
559public:
560 using RoundingMode = llvm::RoundingMode;
561
562 /// The type suitable for storing values of FPOptionsOverride. Must be twice
563 /// as wide as bit size of FPOption.
564 using storage_type = uint32_t;
565 static_assert(sizeof(storage_type) >= 2 * sizeof(FPOptions::storage_type),
566 "Too short type for FPOptionsOverride");
567
568 /// Bit mask selecting bits of OverrideMask in serialized representation of
569 /// FPOptionsOverride.
570 static constexpr storage_type OverrideMaskBits =
571 (static_cast<storage_type>(1) << FPOptions::StorageBitSize) - 1;
572
573 FPOptionsOverride() {}
574 FPOptionsOverride(const LangOptions &LO)
575 : Options(LO), OverrideMask(OverrideMaskBits) {}
576 FPOptionsOverride(FPOptions FPO)
577 : Options(FPO), OverrideMask(OverrideMaskBits) {}
578
579 bool requiresTrailingStorage() const { return OverrideMask != 0; }
580
581 void setAllowFPContractWithinStatement() {
582 setFPContractModeOverride(LangOptions::FPM_On);
583 }
584
585 void setAllowFPContractAcrossStatement() {
586 setFPContractModeOverride(LangOptions::FPM_Fast);
587 }
588
589 void setDisallowFPContract() {
590 setFPContractModeOverride(LangOptions::FPM_Off);
591 }
592
593 void setFPPreciseEnabled(bool Value) {
594 setAllowFPReassociateOverride(!Value);
595 setNoHonorNaNsOverride(!Value);
596 setNoHonorInfsOverride(!Value);
597 setNoSignedZeroOverride(!Value);
598 setAllowReciprocalOverride(!Value);
599 setAllowApproxFuncOverride(!Value);
600 if (Value)
601 /* Precise mode implies fp_contract=on and disables ffast-math */
602 setAllowFPContractWithinStatement();
603 else
604 /* Precise mode disabled sets fp_contract=fast and enables ffast-math */
605 setAllowFPContractAcrossStatement();
606 }
607
608 storage_type getAsOpaqueInt() const {
609 return (static_cast<storage_type>(Options.getAsOpaqueInt())
610 << FPOptions::StorageBitSize) |
611 OverrideMask;
612 }
613 static FPOptionsOverride getFromOpaqueInt(storage_type I) {
614 FPOptionsOverride Opts;
615 Opts.OverrideMask = I & OverrideMaskBits;
616 Opts.Options = FPOptions::getFromOpaqueInt(I >> FPOptions::StorageBitSize);
617 return Opts;
618 }
619
620 FPOptions applyOverrides(FPOptions Base) {
621 FPOptions Result =
622 FPOptions::getFromOpaqueInt((Base.getAsOpaqueInt() & ~OverrideMask) |
623 (Options.getAsOpaqueInt() & OverrideMask));
624 return Result;
625 }
626
627 FPOptions applyOverrides(const LangOptions &LO) {
628 return applyOverrides(FPOptions(LO));
629 }
630
631 bool operator==(FPOptionsOverride other) const {
632 return Options == other.Options && OverrideMask == other.OverrideMask;
633 }
634 bool operator!=(FPOptionsOverride other) const { return !(*this == other); }
635
636#define OPTION(NAME, TYPE, WIDTH, PREVIOUS) \
637 bool has##NAME##Override() const { \
638 return OverrideMask & FPOptions::NAME##Mask; \
639 } \
640 TYPE get##NAME##Override() const { \
641 assert(has##NAME##Override()); \
642 return Options.get##NAME(); \
643 } \
644 void clear##NAME##Override() { \
645 /* Clear the actual value so that we don't have spurious differences when \
646 * testing equality. */ \
647 Options.set##NAME(TYPE(0)); \
648 OverrideMask &= ~FPOptions::NAME##Mask; \
649 } \
650 void set##NAME##Override(TYPE value) { \
651 Options.set##NAME(value); \
652 OverrideMask |= FPOptions::NAME##Mask; \
653 }
654#include "clang/Basic/FPOptions.def"
655 LLVM_DUMP_METHOD void dump();
656};
657
658/// Describes the kind of translation unit being processed.
659enum TranslationUnitKind {
660 /// The translation unit is a complete translation unit.
661 TU_Complete,
662
663 /// The translation unit is a prefix to a translation unit, and is
664 /// not complete.
665 TU_Prefix,
666
667 /// The translation unit is a module.
668 TU_Module
669};
670
671} // namespace clang
672
673#endif // LLVM_CLANG_BASIC_LANGOPTIONS_H
674