Visibility.h revision 218887
1//===--- Visibility.h - Visibility enumeration and utilities ----*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9// 10// This file defines the Visibility enumeration and various utility 11// functions. 12// 13//===----------------------------------------------------------------------===// 14#ifndef LLVM_CLANG_BASIC_VISIBILITY_H 15#define LLVM_CLANG_BASIC_VISIBILITY_H 16 17namespace clang { 18 19/// \link Describes the different kinds of visibility that a 20/// declaration may have. Visibility determines how a declaration 21/// interacts with the dynamic linker. It may also affect whether the 22/// symbol can be found by runtime symbol lookup APIs. 23/// 24/// Visibility is not described in any language standard and 25/// (nonetheless) sometimes has odd behavior. Not all platforms 26/// support all visibility kinds. 27enum Visibility { 28 /// Objects with "hidden" visibility are not seen by the dynamic 29 /// linker. 30 HiddenVisibility, 31 32 /// Objects with "protected" visibility are seen by the dynamic 33 /// linker but always dynamically resolve to an object within this 34 /// shared object. 35 ProtectedVisibility, 36 37 /// Objects with "default" visibility are seen by the dynamic linker 38 /// and act like normal objects. 39 DefaultVisibility 40}; 41 42inline Visibility minVisibility(Visibility L, Visibility R) { 43 return L < R ? L : R; 44} 45 46} 47 48#endif // LLVM_CLANG_BASIC_VISIBILITY_H 49