aboutsummaryrefslogtreecommitdiff
path: root/include/clang/AST/DeclBase.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/AST/DeclBase.h')
-rw-r--r--include/clang/AST/DeclBase.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h
index e3fa41ef31..823340aeaf 100644
--- a/include/clang/AST/DeclBase.h
+++ b/include/clang/AST/DeclBase.h
@@ -241,7 +241,7 @@ private:
SourceLocation Loc;
/// DeclKind - This indicates which class this is.
- unsigned DeclKind : 8;
+ unsigned DeclKind : 6;
/// InvalidDecl - This indicates a semantic error occurred.
unsigned InvalidDecl : 1;
@@ -283,15 +283,16 @@ protected:
/// IdentifierNamespace - This specifies what IDNS_* namespace this lives in.
unsigned IdentifierNamespace : 12;
- /// \brief Whether the \c CachedLinkage field is active.
- ///
- /// This field is only valid for NamedDecls subclasses.
- mutable unsigned HasCachedLinkage : 1;
-
- /// \brief If \c HasCachedLinkage, the linkage of this declaration.
+ /// These fields are only valid for NamedDecls subclasses.
///
- /// This field is only valid for NamedDecls subclasses.
+ /// \brief Nonzero if the cache (i.e. the bitfields here starting
+ /// with 'Cache') is valid. If so, then this is a
+ /// LangOptions::VisibilityMode+1.
+ mutable unsigned CacheValidAndVisibility : 2;
+ /// \brief the linkage of this declaration.
mutable unsigned CachedLinkage : 2;
+ /// \brief true if the visibility is explicit.
+ mutable unsigned CachedVisibilityExplicit : 1;
friend class ASTDeclWriter;
friend class ASTDeclReader;
@@ -308,7 +309,7 @@ protected:
HasAttrs(false), Implicit(false), Used(false), Referenced(false),
Access(AS_none), FromASTFile(0), Hidden(0),
IdentifierNamespace(getIdentifierNamespaceForKind(DK)),
- HasCachedLinkage(0)
+ CacheValidAndVisibility(0)
{
if (StatisticsEnabled) add(DK);
}
@@ -318,7 +319,7 @@ protected:
HasAttrs(false), Implicit(false), Used(false), Referenced(false),
Access(AS_none), FromASTFile(0), Hidden(0),
IdentifierNamespace(getIdentifierNamespaceForKind(DK)),
- HasCachedLinkage(0)
+ CacheValidAndVisibility(0)
{
if (StatisticsEnabled) add(DK);
}