21 const auto *ND = dyn_cast<NamedDecl>(D);
23 return EntityLinkageType::None;
25 switch (ND->getFormalLinkage()) {
27 llvm_unreachable(
"Shouldn't be invalid");
30 return EntityLinkageType::None;
32 return EntityLinkageType::Internal;
34 return EntityLinkageType::Internal;
36 return EntityLinkageType::Internal;
38 return EntityLinkageType::External;
40 return EntityLinkageType::External;
42 llvm_unreachable(
"Unhandled clang::Linkage kind");
52std::optional<EntityId>
Decl - This represents one declaration (or definition), e.g.
Represents a function declaration or definition.
This represents a decl that may have a name.
std::optional< EntityName > getEntityNameForReturn(const FunctionDecl *FD)
Maps return entity of a function to an EntityName.
std::optional< EntityName > getEntityName(const Decl *D)
Maps a declaration to an EntityName.
The JSON file list parser is used to communicate input to InstallAPI.
@ VisibleNone
No linkage according to the standard, but is visible from other translation units because of types de...
@ None
No linkage, which means that the entity is unique and can only be referred to from within its scope.
@ UniqueExternal
External linkage within a unique namespace.
@ Internal
Internal linkage, which indicates that the entity can be referred to from within the translation unit...
@ External
External linkage, which indicates that the entity can be referred to from other translation units.
@ Module
Module linkage, which indicates that the entity can be referred to from other translation units withi...