14 #ifndef LLVM_CLANG_LIB_AST_LINKAGE_H 15 #define LLVM_CLANG_LIB_AST_LINKAGE_H 20 #include "llvm/ADT/DenseMap.h" 21 #include "llvm/ADT/Optional.h" 22 #include "llvm/ADT/PointerIntPair.h" 87 llvm::SmallDenseMap<QueryType, LinkageInfo, 8> CachedLinkageInfo;
90 return QueryType(ND, Kind.
toBits());
95 auto Iter = CachedLinkageInfo.find(makeCacheKey(ND, Kind));
96 if (Iter == CachedLinkageInfo.end())
102 CachedLinkageInfo[makeCacheKey(ND, Kind)] = Info;
123 LinkageInfo getLVForNamespaceScopeDecl(
const NamedDecl *D,
125 bool IgnoreVarTypeLinkage);
127 LinkageInfo getLVForClassMember(
const NamedDecl *D,
129 bool IgnoreVarTypeLinkage);
145 bool IgnoreVarTypeLinkage =
false);
151 return computeTypeLinkageInfo(T.
getTypePtr());
154 LinkageInfo getDeclLinkageAndVisibility(
const NamedDecl *D);
158 return getTypeLinkageAndVisibility(T.
getTypePtr());
Represents a function declaration or definition.
LVComputationKind(NamedDecl::ExplicitVisibilityKind EK)
A (possibly-)qualified type.
C Language Family Type Representation.
Decl - This represents one declaration (or definition), e.g.
The base class of the type hierarchy.
ExplicitVisibilityKind
Kinds of explicit visibility.
Represents a variable template specialization, which refers to a variable template with a given set o...
LinkageInfo getTypeLinkageAndVisibility(QualType T)
Stores a list of template parameters for a TemplateDecl and its derived classes.
unsigned ExplicitKind
The kind of entity whose visibility is ultimately being computed; visibility computations for types a...
Represents a class template specialization, which refers to a class template with a given set of temp...
Provides information about a function template specialization, which is a FunctionDecl that has been ...
const Type * getTypePtr() const
Retrieves a pointer to the underlying (unqualified) type.
LinkageInfo computeTypeLinkageInfo(QualType T)
unsigned IgnoreExplicitVisibility
Whether explicit visibility attributes should be ignored.
bool isTypeVisibility() const
unsigned IgnoreAllVisibility
Whether all visibility should be ignored.
bool isValueVisibility() const
The result type of a method or function.
Dataflow Directional Tag Classes.
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Do an LV computation for, ultimately, a non-type declaration.
Do an LV computation for, ultimately, a type.
NamedDecl::ExplicitVisibilityKind getExplicitVisibilityKind() const
A template argument list.
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate.h) and friends (in DeclFriend.h).
This represents a decl that may have a name.
static LVComputationKind forLinkageOnly()
Do an LV computation when we only care about the linkage.