enum Linkage

Description

Describes the different kinds of linkage (C++ [basic.link], C99 6.2.2) that an entity may have.

Declared at: clang/include/clang/Basic/Linkage.h:23

Enumerators

NameValueComment
NoLinkage0No linkage, which means that the entity is unique and can only be referred to from within its scope.
InternalLinkage1Internal linkage, which indicates that the entity can be referred to from within the translation unit (but not other translation units).
UniqueExternalLinkage2External linkage within a unique namespace.From the language perspective, these entities have external linkage. However, since they reside in an anonymous namespace, their names are unique to this translation unit, which is equivalent to having internal linkage from the code-generation point of view.
VisibleNoLinkage3No linkage according to the standard, but is visible from other translation units because of types defined in a inline function.
ModuleInternalLinkage4Internal linkage according to the Modules TS, but can be referred to from other translation units indirectly through inline functions and templates in the module interface.
ModuleLinkage5Module linkage, which indicates that the entity can be referred to from other translation units within the same module, and indirectly from arbitrary other translation units through inline functions and templates in the module interface.
ExternalLinkage6External linkage, which indicates that the entity can be referred to from other translation units.