clang API Documentation
00001 //===--- Visibility.h - Visibility enumeration and utilities ----*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file defines the Visibility enumeration and various utility 00011 // functions. 00012 // 00013 //===----------------------------------------------------------------------===// 00014 #ifndef LLVM_CLANG_BASIC_VISIBILITY_H 00015 #define LLVM_CLANG_BASIC_VISIBILITY_H 00016 00017 namespace clang { 00018 00019 /// \link Describes the different kinds of visibility that a 00020 /// declaration may have. Visibility determines how a declaration 00021 /// interacts with the dynamic linker. It may also affect whether the 00022 /// symbol can be found by runtime symbol lookup APIs. 00023 /// 00024 /// Visibility is not described in any language standard and 00025 /// (nonetheless) sometimes has odd behavior. Not all platforms 00026 /// support all visibility kinds. 00027 enum Visibility { 00028 /// Objects with "hidden" visibility are not seen by the dynamic 00029 /// linker. 00030 HiddenVisibility, 00031 00032 /// Objects with "protected" visibility are seen by the dynamic 00033 /// linker but always dynamically resolve to an object within this 00034 /// shared object. 00035 ProtectedVisibility, 00036 00037 /// Objects with "default" visibility are seen by the dynamic linker 00038 /// and act like normal objects. 00039 DefaultVisibility 00040 }; 00041 00042 inline Visibility minVisibility(Visibility L, Visibility R) { 00043 return L < R ? L : R; 00044 } 00045 00046 } 00047 00048 #endif // LLVM_CLANG_BASIC_VISIBILITY_H