diff options
author | John McCall <rjmccall@apple.com> | 2010-10-19 05:43:52 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-10-19 05:43:52 +0000 |
commit | 35043e56150dc4eda882acd5ddfe0f8e3c0a8cb1 (patch) | |
tree | a66544d8dcea043df8125d175eb72a17d768f194 | |
parent | 77be2b485f65ad134b3804a6930d5df9d0d974ce (diff) |
MSVC space optimization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116797 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/AST/DeclBase.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h index b45bfa89e8..83100178d5 100644 --- a/include/clang/AST/DeclBase.h +++ b/include/clang/AST/DeclBase.h @@ -201,21 +201,21 @@ private: SourceLocation Loc; /// DeclKind - This indicates which class this is. - Kind DeclKind : 8; + unsigned DeclKind : 8; /// InvalidDecl - This indicates a semantic error occurred. - unsigned int InvalidDecl : 1; + unsigned InvalidDecl : 1; /// HasAttrs - This indicates whether the decl has attributes or not. - unsigned int HasAttrs : 1; + unsigned HasAttrs : 1; /// Implicit - Whether this declaration was implicitly generated by /// the implementation rather than explicitly written by the user. - bool Implicit : 1; + unsigned Implicit : 1; /// \brief Whether this declaration was "used", meaning that a definition is /// required. - bool Used : 1; + unsigned Used : 1; protected: /// Access - Used by C++ decls for the access specifier. @@ -227,7 +227,7 @@ protected: unsigned PCHLevel : 2; /// ChangedAfterLoad - if this declaration has changed since being loaded - bool ChangedAfterLoad : 1; + unsigned ChangedAfterLoad : 1; /// IdentifierNamespace - This specifies what IDNS_* namespace this lives in. unsigned IdentifierNamespace : 15; @@ -272,7 +272,7 @@ public: SourceLocation getLocation() const { return Loc; } void setLocation(SourceLocation L) { Loc = L; } - Kind getKind() const { return DeclKind; } + Kind getKind() const { return static_cast<Kind>(DeclKind); } const char *getDeclKindName() const; Decl *getNextDeclInContext() { return NextDeclInContext; } @@ -681,17 +681,17 @@ public: /// class DeclContext { /// DeclKind - This indicates which class this is. - Decl::Kind DeclKind : 8; + unsigned DeclKind : 8; /// \brief Whether this declaration context also has some external /// storage that contains additional declarations that are lexically /// part of this context. - mutable bool ExternalLexicalStorage : 1; + mutable unsigned ExternalLexicalStorage : 1; /// \brief Whether this declaration context also has some external /// storage that contains additional declarations that are visible /// in this context. - mutable bool ExternalVisibleStorage : 1; + mutable unsigned ExternalVisibleStorage : 1; /// \brief Pointer to the data structure used to lookup declarations /// within this context (or a DependentStoredDeclsMap if this is a @@ -726,7 +726,7 @@ public: ~DeclContext(); Decl::Kind getDeclKind() const { - return DeclKind; + return static_cast<Decl::Kind>(DeclKind); } const char *getDeclKindName() const; |