Go to the documentation of this file.
14 #ifndef LLVM_CLANG_BASIC_VISIBILITY_H
15 #define LLVM_CLANG_BASIC_VISIBILITY_H
54 uint8_t visibility_ : 2;
55 uint8_t explicit_ : 1;
57 void setVisibility(
Visibility V,
bool E) { visibility_ =
V; explicit_ = E; }
62 : linkage_(L), visibility_(
V), explicit_(E) {
120 if (oldVis == newVis && !newExplicit)
125 setVisibility(newVis, newExplicit);
145 #endif // LLVM_CLANG_BASIC_VISIBILITY_H
@ InternalLinkage
Internal linkage, which indicates that the entity can be referred to from within the translation unit...
void mergeLinkage(LinkageInfo other)
@ HiddenVisibility
Objects with "hidden" visibility are not seen by the dynamic linker.
@ VisibleNoLinkage
No linkage according to the standard, but is visible from other translation units because of types de...
Visibility minVisibility(Visibility L, Visibility R)
void mergeMaybeWithVisibility(LinkageInfo other, bool withVis)
Merge linkage and conditionally merge visibility.
bool isVisibilityExplicit() const
@ ProtectedVisibility
Objects with "protected" visibility are seen by the dynamic linker but always dynamically resolve to ...
void merge(LinkageInfo other)
Merge both linkage and visibility.
static LinkageInfo none()
@ NoLinkage
No linkage, which means that the entity is unique and can only be referred to from within its scope.
Linkage minLinkage(Linkage L1, Linkage L2)
Compute the minimum linkage given two linkages.
Linkage
Describes the different kinds of linkage (C++ [basic.link], C99 6.2.2) that an entity may have.
static LinkageInfo uniqueExternal()
@ UniqueExternalLinkage
External linkage within a unique namespace.
bool isExternallyVisible(Linkage L)
void mergeVisibility(Visibility newVis, bool newExplicit)
Merge in the visibility 'newVis'.
Visibility getVisibility() const
Visibility
Describes the different kinds of visibility that a declaration may have.
void setLinkage(Linkage L)
void mergeVisibility(LinkageInfo other)
static LinkageInfo visible_none()
void mergeLinkage(Linkage L)
Linkage getLinkage() const
static LinkageInfo external()
@ ExternalLinkage
External linkage, which indicates that the entity can be referred to from other translation units.
@ DefaultVisibility
Objects with "default" visibility are seen by the dynamic linker and act like normal objects.
LinkageInfo(Linkage L, Visibility V, bool E)
void mergeExternalVisibility(LinkageInfo Other)
void mergeExternalVisibility(Linkage L)