15 #ifndef LLVM_CLANG_LIB_AST_LINKAGE_H 16 #define LLVM_CLANG_LIB_AST_LINKAGE_H 21 #include "llvm/ADT/DenseMap.h" 22 #include "llvm/ADT/Optional.h" 23 #include "llvm/ADT/PointerIntPair.h" 88 llvm::SmallDenseMap<QueryType, LinkageInfo, 8> CachedLinkageInfo;
91 return QueryType(ND, Kind.
toBits());
96 auto Iter = CachedLinkageInfo.find(makeCacheKey(ND, Kind));
97 if (Iter == CachedLinkageInfo.end())
103 CachedLinkageInfo[makeCacheKey(ND, Kind)] = Info;
124 LinkageInfo getLVForNamespaceScopeDecl(
const NamedDecl *D,
126 bool IgnoreVarTypeLinkage);
128 LinkageInfo getLVForClassMember(
const NamedDecl *D,
130 bool IgnoreVarTypeLinkage);
146 bool IgnoreVarTypeLinkage =
false);
152 return computeTypeLinkageInfo(T.
getTypePtr());
155 LinkageInfo getDeclLinkageAndVisibility(
const NamedDecl *D);
159 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.