14#ifndef LLVM_CLANG_BASIC_VISIBILITY_H
15#define LLVM_CLANG_BASIC_VISIBILITY_H
18#include "llvm/ADT/STLForwardCompat.h"
57 uint8_t visibility_ : 2;
58 LLVM_PREFERRED_TYPE(
bool)
59 uint8_t explicit_ : 1;
61 void setVisibility(
Visibility V,
bool E) { visibility_ =
V; explicit_ =
E; }
67 : linkage_(
llvm::to_underlying(L)), visibility_(
V), explicit_(
E) {
125 if (oldVis == newVis && !newExplicit)
130 setVisibility(newVis, newExplicit);
Visibility getVisibility() const
static LinkageInfo external()
static LinkageInfo none()
void setLinkage(Linkage L)
void mergeExternalVisibility(Linkage L)
void mergeMaybeWithVisibility(LinkageInfo other, bool withVis)
Merge linkage and conditionally merge visibility.
void mergeLinkage(Linkage L)
Linkage getLinkage() const
void mergeExternalVisibility(LinkageInfo Other)
void mergeVisibility(LinkageInfo other)
static LinkageInfo internal()
static LinkageInfo visible_none()
LinkageInfo(Linkage L, Visibility V, bool E)
static LinkageInfo uniqueExternal()
void mergeVisibility(Visibility newVis, bool newExplicit)
Merge in the visibility 'newVis'.
void mergeLinkage(LinkageInfo other)
bool isVisibilityExplicit() const
void merge(LinkageInfo other)
Merge both linkage and visibility.
Defines the Linkage enumeration and various utility functions.
The JSON file list parser is used to communicate input to InstallAPI.
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.
@ 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.
Visibility minVisibility(Visibility L, Visibility R)
bool isExternallyVisible(Linkage L)
@ Other
Other implicit parameter.
Visibility
Describes the different kinds of visibility that a declaration may have.
@ HiddenVisibility
Objects with "hidden" visibility are not seen by the dynamic linker.
@ ProtectedVisibility
Objects with "protected" visibility are seen by the dynamic linker but always dynamically resolve to ...
@ DefaultVisibility
Objects with "default" visibility are seen by the dynamic linker and act like normal objects.
Diagnostic wrappers for TextAPI types for error reporting.