Skip to content

Commit 46a04f8

Browse files
committed
MSVC space optimization.
llvm-svn: 116797
1 parent be19d72 commit 46a04f8

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

clang/include/clang/AST/DeclBase.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -201,21 +201,21 @@ class Decl {
201201
SourceLocation Loc;
202202

203203
/// DeclKind - This indicates which class this is.
204-
Kind DeclKind : 8;
204+
unsigned DeclKind : 8;
205205

206206
/// InvalidDecl - This indicates a semantic error occurred.
207-
unsigned int InvalidDecl : 1;
207+
unsigned InvalidDecl : 1;
208208

209209
/// HasAttrs - This indicates whether the decl has attributes or not.
210-
unsigned int HasAttrs : 1;
210+
unsigned HasAttrs : 1;
211211

212212
/// Implicit - Whether this declaration was implicitly generated by
213213
/// the implementation rather than explicitly written by the user.
214-
bool Implicit : 1;
214+
unsigned Implicit : 1;
215215

216216
/// \brief Whether this declaration was "used", meaning that a definition is
217217
/// required.
218-
bool Used : 1;
218+
unsigned Used : 1;
219219

220220
protected:
221221
/// Access - Used by C++ decls for the access specifier.
@@ -227,7 +227,7 @@ class Decl {
227227
unsigned PCHLevel : 2;
228228

229229
/// ChangedAfterLoad - if this declaration has changed since being loaded
230-
bool ChangedAfterLoad : 1;
230+
unsigned ChangedAfterLoad : 1;
231231

232232
/// IdentifierNamespace - This specifies what IDNS_* namespace this lives in.
233233
unsigned IdentifierNamespace : 15;
@@ -272,7 +272,7 @@ class Decl {
272272
SourceLocation getLocation() const { return Loc; }
273273
void setLocation(SourceLocation L) { Loc = L; }
274274

275-
Kind getKind() const { return DeclKind; }
275+
Kind getKind() const { return static_cast<Kind>(DeclKind); }
276276
const char *getDeclKindName() const;
277277

278278
Decl *getNextDeclInContext() { return NextDeclInContext; }
@@ -681,17 +681,17 @@ class DeclContextLookupConstResult
681681
///
682682
class DeclContext {
683683
/// DeclKind - This indicates which class this is.
684-
Decl::Kind DeclKind : 8;
684+
unsigned DeclKind : 8;
685685

686686
/// \brief Whether this declaration context also has some external
687687
/// storage that contains additional declarations that are lexically
688688
/// part of this context.
689-
mutable bool ExternalLexicalStorage : 1;
689+
mutable unsigned ExternalLexicalStorage : 1;
690690

691691
/// \brief Whether this declaration context also has some external
692692
/// storage that contains additional declarations that are visible
693693
/// in this context.
694-
mutable bool ExternalVisibleStorage : 1;
694+
mutable unsigned ExternalVisibleStorage : 1;
695695

696696
/// \brief Pointer to the data structure used to lookup declarations
697697
/// within this context (or a DependentStoredDeclsMap if this is a
@@ -726,7 +726,7 @@ class DeclContext {
726726
~DeclContext();
727727

728728
Decl::Kind getDeclKind() const {
729-
return DeclKind;
729+
return static_cast<Decl::Kind>(DeclKind);
730730
}
731731
const char *getDeclKindName() const;
732732

0 commit comments

Comments
 (0)