class LinkageComputer

Declaration

class LinkageComputer { /* full declaration omitted */ };

Declared at: clang/lib/AST/Linkage.h:74

Member Variables

private llvm::SmallDenseMap<QueryType, LinkageInfo, 8> CachedLinkageInfo

Method Overview

  • private void cache(const clang::NamedDecl * ND, clang::LVComputationKind Kind, clang::LinkageInfo Info)
  • public clang::LinkageInfo computeLVForDecl(const clang::NamedDecl * D, clang::LVComputationKind computation, bool IgnoreVarTypeLinkage = false)
  • public clang::LinkageInfo computeTypeLinkageInfo(clang::QualType T)
  • public clang::LinkageInfo computeTypeLinkageInfo(const clang::Type * T)
  • public clang::LinkageInfo getDeclLinkageAndVisibility(const clang::NamedDecl * D)
  • private clang::LinkageInfo getLVForClassMember(const clang::NamedDecl * D, clang::LVComputationKind computation, bool IgnoreVarTypeLinkage)
  • private clang::LinkageInfo getLVForClosure(const clang::DeclContext * DC, clang::Decl * ContextDecl, clang::LVComputationKind computation)
  • public clang::LinkageInfo getLVForDecl(const clang::NamedDecl * D, clang::LVComputationKind computation)
  • private clang::LinkageInfo getLVForLocalDecl(const clang::NamedDecl * D, clang::LVComputationKind computation)
  • private clang::LinkageInfo getLVForNamespaceScopeDecl(const clang::NamedDecl * D, clang::LVComputationKind computation, bool IgnoreVarTypeLinkage)
  • private clang::LinkageInfo getLVForTemplateArgumentList(const clang::TemplateArgumentList & TArgs, clang::LVComputationKind computation)
  • private clang::LinkageInfo getLVForTemplateArgumentList(ArrayRef<clang::TemplateArgument> Args, clang::LVComputationKind computation)
  • private clang::LinkageInfo getLVForTemplateParameterList(const clang::TemplateParameterList * Params, clang::LVComputationKind computation)
  • private clang::LinkageInfo getLVForType(const clang::Type & T, clang::LVComputationKind computation)
  • private clang::LinkageInfo getLVForValue(const clang::APValue & V, clang::LVComputationKind computation)
  • public clang::LinkageInfo getTypeLinkageAndVisibility(clang::QualType T)
  • public clang::LinkageInfo getTypeLinkageAndVisibility(const clang::Type * T)
  • private llvm::Optional<LinkageInfo> lookup(const clang::NamedDecl * ND, clang::LVComputationKind Kind) const
  • private static clang::LinkageComputer::QueryType makeCacheKey(const clang::NamedDecl * ND, clang::LVComputationKind Kind)
  • private void mergeTemplateLV(clang::LinkageInfo & LV, const clang::VarTemplateSpecializationDecl * spec, clang::LVComputationKind computation)
  • private void mergeTemplateLV(clang::LinkageInfo & LV, const clang::ClassTemplateSpecializationDecl * spec, clang::LVComputationKind computation)
  • private void mergeTemplateLV(clang::LinkageInfo & LV, const clang::FunctionDecl * fn, const clang::FunctionTemplateSpecializationInfo * specInfo, clang::LVComputationKind computation)

Methods

void cache(const clang::NamedDecl* ND,
           clang::LVComputationKind Kind,
           clang::LinkageInfo Info)

Declared at: clang/lib/AST/Linkage.h:102

Parameters

const clang::NamedDecl* ND
clang::LVComputationKind Kind
clang::LinkageInfo Info

clang::LinkageInfo computeLVForDecl(
    const clang::NamedDecl* D,
    clang::LVComputationKind computation,
    bool IgnoreVarTypeLinkage = false)

Declared at: clang/lib/AST/Linkage.h:146

Parameters

const clang::NamedDecl* D
clang::LVComputationKind computation
bool IgnoreVarTypeLinkage = false

clang::LinkageInfo computeTypeLinkageInfo(
    clang::QualType T)

Declared at: clang/lib/AST/Linkage.h:153

Parameters

clang::QualType T

clang::LinkageInfo computeTypeLinkageInfo(
    const clang::Type* T)

Declared at: clang/lib/AST/Linkage.h:152

Parameters

const clang::Type* T

clang::LinkageInfo getDeclLinkageAndVisibility(
    const clang::NamedDecl* D)

Declared at: clang/lib/AST/Linkage.h:157

Parameters

const clang::NamedDecl* D

clang::LinkageInfo getLVForClassMember(
    const clang::NamedDecl* D,
    clang::LVComputationKind computation,
    bool IgnoreVarTypeLinkage)

Declared at: clang/lib/AST/Linkage.h:128

Parameters

const clang::NamedDecl* D
clang::LVComputationKind computation
bool IgnoreVarTypeLinkage

clang::LinkageInfo getLVForClosure(
    const clang::DeclContext* DC,
    clang::Decl* ContextDecl,
    clang::LVComputationKind computation)

Declared at: clang/lib/AST/Linkage.h:132

Parameters

const clang::DeclContext* DC
clang::Decl* ContextDecl
clang::LVComputationKind computation

clang::LinkageInfo getLVForDecl(
    const clang::NamedDecl* D,
    clang::LVComputationKind computation)

Description

getLVForDecl - Get the linkage and visibility for the given declaration.

Declared at: clang/lib/AST/Linkage.h:150

Parameters

const clang::NamedDecl* D
clang::LVComputationKind computation

clang::LinkageInfo getLVForLocalDecl(
    const clang::NamedDecl* D,
    clang::LVComputationKind computation)

Declared at: clang/lib/AST/Linkage.h:135

Parameters

const clang::NamedDecl* D
clang::LVComputationKind computation

clang::LinkageInfo getLVForNamespaceScopeDecl(
    const clang::NamedDecl* D,
    clang::LVComputationKind computation,
    bool IgnoreVarTypeLinkage)

Declared at: clang/lib/AST/Linkage.h:124

Parameters

const clang::NamedDecl* D
clang::LVComputationKind computation
bool IgnoreVarTypeLinkage

clang::LinkageInfo getLVForTemplateArgumentList(
    const clang::TemplateArgumentList& TArgs,
    clang::LVComputationKind computation)

Declared at: clang/lib/AST/Linkage.h:109

Parameters

const clang::TemplateArgumentList& TArgs
clang::LVComputationKind computation

clang::LinkageInfo getLVForTemplateArgumentList(
    ArrayRef<clang::TemplateArgument> Args,
    clang::LVComputationKind computation)

Description

Get the most restrictive linkage for the types and declarations in the given template argument list. Note that we don't take an LVComputationKind because we always want to honor the visibility of template arguments in the same way.

Declared at: clang/lib/AST/Linkage.h:106

Parameters

ArrayRef<clang::TemplateArgument> Args
clang::LVComputationKind computation

clang::LinkageInfo getLVForTemplateParameterList(
    const clang::TemplateParameterList* Params,
    clang::LVComputationKind computation)

Description

Get the most restrictive linkage for the types in the given template parameter list. For visibility purposes, template parameters are part of the signature of a template.

Declared at: clang/lib/AST/Linkage.h:140

Parameters

const clang::TemplateParameterList* Params
clang::LVComputationKind computation

clang::LinkageInfo getLVForType(
    const clang::Type& T,
    clang::LVComputationKind computation)

Declared at: clang/lib/AST/Linkage.h:138

Parameters

const clang::Type& T
clang::LVComputationKind computation

clang::LinkageInfo getLVForValue(
    const clang::APValue& V,
    clang::LVComputationKind computation)

Declared at: clang/lib/AST/Linkage.h:143

Parameters

const clang::APValue& V
clang::LVComputationKind computation

clang::LinkageInfo getTypeLinkageAndVisibility(
    clang::QualType T)

Declared at: clang/lib/AST/Linkage.h:160

Parameters

clang::QualType T

clang::LinkageInfo getTypeLinkageAndVisibility(
    const clang::Type* T)

Declared at: clang/lib/AST/Linkage.h:159

Parameters

const clang::Type* T

llvm::Optional<LinkageInfo> lookup(
    const clang::NamedDecl* ND,
    clang::LVComputationKind Kind) const

Declared at: clang/lib/AST/Linkage.h:94

Parameters

const clang::NamedDecl* ND
clang::LVComputationKind Kind

static clang::LinkageComputer::QueryType
makeCacheKey(const clang::NamedDecl* ND,
             clang::LVComputationKind Kind)

Declared at: clang/lib/AST/Linkage.h:90

Parameters

const clang::NamedDecl* ND
clang::LVComputationKind Kind

void mergeTemplateLV(
    clang::LinkageInfo& LV,
    const clang::VarTemplateSpecializationDecl*
        spec,
    clang::LVComputationKind computation)

Description

Merge in template-related linkage and visibility for the given variable template specialization. As usual, follow class template specialization logic up to initialization.

Declared at: clang/lib/AST/Linkage.h:120

Parameters

clang::LinkageInfo& LV
const clang::VarTemplateSpecializationDecl* spec
clang::LVComputationKind computation

void mergeTemplateLV(
    clang::LinkageInfo& LV,
    const clang::ClassTemplateSpecializationDecl*
        spec,
    clang::LVComputationKind computation)

Description

Merge in template-related linkage and visibility for the given class template specialization.

Declared at: clang/lib/AST/Linkage.h:116

Parameters

clang::LinkageInfo& LV
const clang::ClassTemplateSpecializationDecl* spec
clang::LVComputationKind computation

void mergeTemplateLV(
    clang::LinkageInfo& LV,
    const clang::FunctionDecl* fn,
    const clang::
        FunctionTemplateSpecializationInfo*
            specInfo,
    clang::LVComputationKind computation)

Description

Merge in template-related linkage and visibility for the given function template specialization. We don't need a computation kind here because we can assume LVForValue.

Declared at: clang/lib/AST/Linkage.h:112

Parameters

clang::LinkageInfo& LV
the computation to use for the parent
const clang::FunctionDecl* fn
const clang::FunctionTemplateSpecializationInfo* specInfo
clang::LVComputationKind computation