|
30 | 30 |
|
31 | 31 | namespace clang {
|
32 | 32 |
|
33 |
| -/// Bitfields of LangOptions, split out from LangOptions in order to ensure that |
34 |
| -/// this large collection of bitfields is a trivial class type. |
35 |
| -class LangOptionsBase { |
36 |
| - friend class CompilerInvocation; |
37 |
| - friend class CompilerInvocationBase; |
38 |
| - |
39 |
| -public: |
40 |
| - // Define simple language options (with no accessors). |
41 |
| -#define LANGOPT(Name, Bits, Default, Description) unsigned Name : Bits; |
42 |
| -#define ENUM_LANGOPT(Name, Type, Bits, Default, Description) |
43 |
| -#include "clang/Basic/LangOptions.def" |
44 |
| - |
45 |
| -protected: |
46 |
| - // Define language options of enumeration type. These are private, and will |
47 |
| - // have accessors (below). |
48 |
| -#define LANGOPT(Name, Bits, Default, Description) |
49 |
| -#define ENUM_LANGOPT(Name, Type, Bits, Default, Description) \ |
50 |
| - unsigned Name : Bits; |
51 |
| -#include "clang/Basic/LangOptions.def" |
52 |
| -}; |
53 |
| - |
54 | 33 | /// In the Microsoft ABI, this controls the placement of virtual displacement
|
55 | 34 | /// members used to implement virtual inheritance.
|
56 | 35 | enum class MSVtorDispMode { Never, ForVBaseOverride, ForVFTable };
|
@@ -78,9 +57,12 @@ enum class ShaderStage {
|
78 | 57 | Invalid,
|
79 | 58 | };
|
80 | 59 |
|
81 |
| -/// Keeps track of the various options that can be |
82 |
| -/// enabled, which controls the dialect of C or C++ that is accepted. |
83 |
| -class LangOptions : public LangOptionsBase { |
| 60 | +/// Bitfields of LangOptions, split out from LangOptions in order to ensure that |
| 61 | +/// this large collection of bitfields is a trivial class type. |
| 62 | +class LangOptionsBase { |
| 63 | + friend class CompilerInvocation; |
| 64 | + friend class CompilerInvocationBase; |
| 65 | + |
84 | 66 | public:
|
85 | 67 | using Visibility = clang::Visibility;
|
86 | 68 | using RoundingMode = llvm::RoundingMode;
|
@@ -416,6 +398,24 @@ class LangOptions : public LangOptionsBase {
|
416 | 398 |
|
417 | 399 | enum ComplexRangeKind { CX_Full, CX_Limited, CX_Fortran, CX_None };
|
418 | 400 |
|
| 401 | + // Define simple language options (with no accessors). |
| 402 | +#define LANGOPT(Name, Bits, Default, Description) unsigned Name : Bits; |
| 403 | +#define ENUM_LANGOPT(Name, Type, Bits, Default, Description) |
| 404 | +#include "clang/Basic/LangOptions.def" |
| 405 | + |
| 406 | +protected: |
| 407 | + // Define language options of enumeration type. These are private, and will |
| 408 | + // have accessors (below). |
| 409 | +#define LANGOPT(Name, Bits, Default, Description) |
| 410 | +#define ENUM_LANGOPT(Name, Type, Bits, Default, Description) \ |
| 411 | + LLVM_PREFERRED_TYPE(Type) \ |
| 412 | + unsigned Name : Bits; |
| 413 | +#include "clang/Basic/LangOptions.def" |
| 414 | +}; |
| 415 | + |
| 416 | +/// Keeps track of the various options that can be |
| 417 | +/// enabled, which controls the dialect of C or C++ that is accepted. |
| 418 | +class LangOptions : public LangOptionsBase { |
419 | 419 | public:
|
420 | 420 | /// The used language standard.
|
421 | 421 | LangStandard::Kind LangStd;
|
|
0 commit comments