llvm.org GIT mirror llvm / 13d0b52
Add some comments, fix an 80 cols violation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33576 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Spencer 13 years ago
1 changed file(s) with 16 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
2626 class GlobalValue : public Constant {
2727 GlobalValue(const GlobalValue &); // do not implement
2828 public:
29 /// @brief An enumeration for the kinds of linkage for global values.
2930 enum LinkageTypes {
30 ExternalLinkage, /// Externally visible function
31 LinkOnceLinkage, /// Keep one copy of function when linking (inline)
32 WeakLinkage, /// Keep one copy of named function when linking (weak)
33 AppendingLinkage, /// Special purpose, only applies to global arrays
34 InternalLinkage, /// Rename collisions when linking (static functions)
35 DLLImportLinkage, /// Function to be imported from DLL
36 DLLExportLinkage, /// Function to be accessible from DLL
37 ExternalWeakLinkage, /// ExternalWeak linkage description
38 GhostLinkage /// Stand-in functions for streaming fns from BC files
31 ExternalLinkage, ///< Externally visible function
32 LinkOnceLinkage, ///< Keep one copy of function when linking (inline)
33 WeakLinkage, ///< Keep one copy of named function when linking (weak)
34 AppendingLinkage, ///< Special purpose, only applies to global arrays
35 InternalLinkage, ///< Rename collisions when linking (static functions)
36 DLLImportLinkage, ///< Function to be imported from DLL
37 DLLExportLinkage, ///< Function to be accessible from DLL
38 ExternalWeakLinkage,///< ExternalWeak linkage description
39 GhostLinkage ///< Stand-in functions for streaming fns from BC files
3940 };
41
42 /// @brief An enumeration for the kinds of visibility of global values.
4043 enum VisibilityTypes {
41 DefaultVisibility,
42 HiddenVisibility
44 DefaultVisibility, ///< The GV is visible
45 HiddenVisibility ///< The GV is hidden
4346 };
47
4448 protected:
4549 GlobalValue(const Type *Ty, ValueTy vty, Use *Ops, unsigned NumOps,
4650 LinkageTypes linkage, const std::string &name = "")
9094 bool hasInternalLinkage() const { return Linkage == InternalLinkage; }
9195 bool hasDLLImportLinkage() const { return Linkage == DLLImportLinkage; }
9296 bool hasDLLExportLinkage() const { return Linkage == DLLExportLinkage; }
93 bool hasExternalWeakLinkage() const { return Linkage == ExternalWeakLinkage; }
97 bool hasExternalWeakLinkage() const { return Linkage == ExternalWeakLinkage; }
9498 void setLinkage(LinkageTypes LT) { Linkage = LT; }
9599 LinkageTypes getLinkage() const { return Linkage; }
96100