14#ifndef LLVM_CLANG_LIB_AST_LINKAGE_H
15#define LLVM_CLANG_LIB_AST_LINKAGE_H
21#include "llvm/ADT/DenseMap.h"
22#include "llvm/ADT/PointerIntPair.h"
32 LLVM_PREFERRED_TYPE(
bool)
36 LLVM_PREFERRED_TYPE(
bool)
40 LLVM_PREFERRED_TYPE(
bool)
63 Result.IgnoreExplicitVisibility =
true;
64 Result.IgnoreAllVisibility =
true;
91 llvm::SmallDenseMap<QueryType, LinkageInfo, 8> CachedLinkageInfo;
94 return QueryType(ND,
Kind.toBits());
97 std::optional<LinkageInfo> lookup(
const NamedDecl *ND,
99 auto Iter = CachedLinkageInfo.find(makeCacheKey(ND,
Kind));
100 if (
Iter == CachedLinkageInfo.end())
106 CachedLinkageInfo[makeCacheKey(ND,
Kind)] = Info;
129 bool IgnoreVarTypeLinkage);
133 bool IgnoreVarTypeLinkage);
151 bool IgnoreVarTypeLinkage =
false);
Forward declaration of all AST node types.
enum clang::sema::@1655::IndirectLocalPathEntry::EntryKind Kind
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....
C Language Family Type Representation.
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat],...
Represents a class template specialization, which refers to a class template with a given set of temp...
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Decl - This represents one declaration (or definition), e.g.
Represents a function declaration or definition.
Provides information about a function template specialization, which is a FunctionDecl that has been ...
LinkageInfo computeTypeLinkageInfo(const Type *T)
LinkageInfo getTypeLinkageAndVisibility(const Type *T)
LinkageInfo computeLVForDecl(const NamedDecl *D, LVComputationKind computation, bool IgnoreVarTypeLinkage=false)
LinkageInfo computeTypeLinkageInfo(QualType T)
LinkageInfo getLVForDecl(const NamedDecl *D, LVComputationKind computation)
getLVForDecl - Get the linkage and visibility for the given declaration.
LinkageInfo getDeclLinkageAndVisibility(const NamedDecl *D)
LinkageInfo getTypeLinkageAndVisibility(QualType T)
This represents a decl that may have a name.
ExplicitVisibilityKind
Kinds of explicit visibility.
@ VisibilityForValue
Do an LV computation for, ultimately, a non-type declaration.
@ VisibilityForType
Do an LV computation for, ultimately, a type.
A (possibly-)qualified type.
A template argument list.
Stores a list of template parameters for a TemplateDecl and its derived classes.
The base class of the type hierarchy.
Represents a variable template specialization, which refers to a variable template with a given set o...
The JSON file list parser is used to communicate input to InstallAPI.
@ Result
The result type of a method or function.
const FunctionProtoType * T
bool isTypeVisibility() const
unsigned ExplicitKind
The kind of entity whose visibility is ultimately being computed; visibility computations for types a...
unsigned IgnoreExplicitVisibility
Whether explicit visibility attributes should be ignored.
LVComputationKind(NamedDecl::ExplicitVisibilityKind EK)
unsigned IgnoreAllVisibility
Whether all visibility should be ignored.
NamedDecl::ExplicitVisibilityKind getExplicitVisibilityKind() const
static LVComputationKind forLinkageOnly()
Do an LV computation when we only care about the linkage.
@ NumLVComputationKindBits
bool isValueVisibility() const