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
Name | Value | Comment |
---|---|---|
NoLinkage | 0 | No linkage, which means that the entity is unique and can only be referred to from within its scope. |
InternalLinkage | 1 | Internal linkage, which indicates that the entity can be referred to from within the translation unit (but not other translation units). |
UniqueExternalLinkage | 2 | External 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. |
VisibleNoLinkage | 3 | No linkage according to the standard, but is visible from other translation units because of types defined in a inline function. |
ModuleInternalLinkage | 4 | Internal 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. |
ModuleLinkage | 5 | Module 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. |
ExternalLinkage | 6 | External linkage, which indicates that the entity can be referred to from other translation units. |