@@ -75,6 +75,7 @@ class TemplateParameterList;
75
75
class TypeAliasTemplateDecl ;
76
76
class UnresolvedSetImpl ;
77
77
class VarTemplateDecl ;
78
+ enum class ImplicitParamKind ;
78
79
79
80
// / The top declaration context.
80
81
class TranslationUnitDecl : public Decl ,
@@ -969,12 +970,16 @@ class VarDecl : public DeclaratorDecl, public Redeclarable<VarDecl> {
969
970
friend class ASTDeclReader ;
970
971
friend class VarDecl ;
971
972
973
+ LLVM_PREFERRED_TYPE (StorageClass)
972
974
unsigned SClass : 3 ;
975
+ LLVM_PREFERRED_TYPE (ThreadStorageClassSpecifier)
973
976
unsigned TSCSpec : 2 ;
977
+ LLVM_PREFERRED_TYPE (InitializationStyle)
974
978
unsigned InitStyle : 2 ;
975
979
976
980
// / Whether this variable is an ARC pseudo-__strong variable; see
977
981
// / isARCPseudoStrong() for details.
982
+ LLVM_PREFERRED_TYPE (bool )
978
983
unsigned ARCPseudoStrong : 1 ;
979
984
};
980
985
enum { NumVarDeclBits = 8 };
@@ -995,22 +1000,27 @@ class VarDecl : public DeclaratorDecl, public Redeclarable<VarDecl> {
995
1000
friend class ASTDeclReader ;
996
1001
friend class ParmVarDecl ;
997
1002
1003
+ LLVM_PREFERRED_TYPE (VarDeclBitfields)
998
1004
unsigned : NumVarDeclBits;
999
1005
1000
1006
// / Whether this parameter inherits a default argument from a
1001
1007
// / prior declaration.
1008
+ LLVM_PREFERRED_TYPE (bool )
1002
1009
unsigned HasInheritedDefaultArg : 1 ;
1003
1010
1004
1011
// / Describes the kind of default argument for this parameter. By default
1005
1012
// / this is none. If this is normal, then the default argument is stored in
1006
1013
// / the \c VarDecl initializer expression unless we were unable to parse
1007
1014
// / (even an invalid) expression for the default argument.
1015
+ LLVM_PREFERRED_TYPE (DefaultArgKind)
1008
1016
unsigned DefaultArgKind : 2 ;
1009
1017
1010
1018
// / Whether this parameter undergoes K&R argument promotion.
1019
+ LLVM_PREFERRED_TYPE (bool )
1011
1020
unsigned IsKNRPromoted : 1 ;
1012
1021
1013
1022
// / Whether this parameter is an ObjC method parameter or not.
1023
+ LLVM_PREFERRED_TYPE (bool )
1014
1024
unsigned IsObjCMethodParam : 1 ;
1015
1025
1016
1026
// / If IsObjCMethodParam, a Decl::ObjCDeclQualifier.
@@ -1029,51 +1039,64 @@ class VarDecl : public DeclaratorDecl, public Redeclarable<VarDecl> {
1029
1039
friend class ImplicitParamDecl ;
1030
1040
friend class VarDecl ;
1031
1041
1042
+ LLVM_PREFERRED_TYPE (VarDeclBitfields)
1032
1043
unsigned : NumVarDeclBits;
1033
1044
1034
1045
// FIXME: We need something similar to CXXRecordDecl::DefinitionData.
1035
1046
// / Whether this variable is a definition which was demoted due to
1036
1047
// / module merge.
1048
+ LLVM_PREFERRED_TYPE (bool )
1037
1049
unsigned IsThisDeclarationADemotedDefinition : 1 ;
1038
1050
1039
1051
// / Whether this variable is the exception variable in a C++ catch
1040
1052
// / or an Objective-C @catch statement.
1053
+ LLVM_PREFERRED_TYPE (bool )
1041
1054
unsigned ExceptionVar : 1 ;
1042
1055
1043
1056
// / Whether this local variable could be allocated in the return
1044
1057
// / slot of its function, enabling the named return value optimization
1045
1058
// / (NRVO).
1059
+ LLVM_PREFERRED_TYPE (bool )
1046
1060
unsigned NRVOVariable : 1 ;
1047
1061
1048
1062
// / Whether this variable is the for-range-declaration in a C++0x
1049
1063
// / for-range statement.
1064
+ LLVM_PREFERRED_TYPE (bool )
1050
1065
unsigned CXXForRangeDecl : 1 ;
1051
1066
1052
1067
// / Whether this variable is the for-in loop declaration in Objective-C.
1068
+ LLVM_PREFERRED_TYPE (bool )
1053
1069
unsigned ObjCForDecl : 1 ;
1054
1070
1055
1071
// / Whether this variable is (C++1z) inline.
1072
+ LLVM_PREFERRED_TYPE (bool )
1056
1073
unsigned IsInline : 1 ;
1057
1074
1058
1075
// / Whether this variable has (C++1z) inline explicitly specified.
1076
+ LLVM_PREFERRED_TYPE (bool )
1059
1077
unsigned IsInlineSpecified : 1 ;
1060
1078
1061
1079
// / Whether this variable is (C++0x) constexpr.
1080
+ LLVM_PREFERRED_TYPE (bool )
1062
1081
unsigned IsConstexpr : 1 ;
1063
1082
1064
1083
// / Whether this variable is the implicit variable for a lambda
1065
1084
// / init-capture.
1085
+ LLVM_PREFERRED_TYPE (bool )
1066
1086
unsigned IsInitCapture : 1 ;
1067
1087
1068
1088
// / Whether this local extern variable's previous declaration was
1069
1089
// / declared in the same block scope. This controls whether we should merge
1070
1090
// / the type of this declaration with its previous declaration.
1091
+ LLVM_PREFERRED_TYPE (bool )
1071
1092
unsigned PreviousDeclInSameBlockScope : 1 ;
1072
1093
1073
1094
// / Defines kind of the ImplicitParamDecl: 'this', 'self', 'vtt', '_cmd' or
1074
1095
// / something else.
1096
+ LLVM_PREFERRED_TYPE (ImplicitParamKind)
1075
1097
unsigned ImplicitParamKind : 3 ;
1076
1098
1099
+ LLVM_PREFERRED_TYPE (bool )
1077
1100
unsigned EscapingByref : 1 ;
1078
1101
};
1079
1102
@@ -3013,8 +3036,11 @@ class FieldDecl : public DeclaratorDecl, public Mergeable<FieldDecl> {
3013
3036
ISK_CapturedVLAType,
3014
3037
};
3015
3038
3039
+ LLVM_PREFERRED_TYPE (bool )
3016
3040
unsigned BitField : 1 ;
3041
+ LLVM_PREFERRED_TYPE (bool )
3017
3042
unsigned Mutable : 1 ;
3043
+ LLVM_PREFERRED_TYPE (InitStorageKind)
3018
3044
unsigned StorageKind : 2 ;
3019
3045
mutable unsigned CachedFieldIndex : 28 ;
3020
3046
0 commit comments