aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-01-27 04:42:50 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-01-27 04:42:50 +0000
commit13d0b528ee8d5e69fe721691966b7c18627f1600 (patch)
treeccc3e554b03f62b2d92afc0dc378eddcbbaf5a25
parentfcdea7baf0e5fa83210a76d429c389a8059466fa (diff)
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
-rw-r--r--include/llvm/GlobalValue.h28
1 files changed, 16 insertions, 12 deletions
diff --git a/include/llvm/GlobalValue.h b/include/llvm/GlobalValue.h
index 2fbbbc0437..5b6431837b 100644
--- a/include/llvm/GlobalValue.h
+++ b/include/llvm/GlobalValue.h
@@ -27,21 +27,25 @@ class Module;
class GlobalValue : public Constant {
GlobalValue(const GlobalValue &); // do not implement
public:
+ /// @brief An enumeration for the kinds of linkage for global values.
enum LinkageTypes {
- ExternalLinkage, /// Externally visible function
- LinkOnceLinkage, /// Keep one copy of function when linking (inline)
- WeakLinkage, /// Keep one copy of named function when linking (weak)
- AppendingLinkage, /// Special purpose, only applies to global arrays
- InternalLinkage, /// Rename collisions when linking (static functions)
- DLLImportLinkage, /// Function to be imported from DLL
- DLLExportLinkage, /// Function to be accessible from DLL
- ExternalWeakLinkage, /// ExternalWeak linkage description
- GhostLinkage /// Stand-in functions for streaming fns from BC files
+ ExternalLinkage, ///< Externally visible function
+ LinkOnceLinkage, ///< Keep one copy of function when linking (inline)
+ WeakLinkage, ///< Keep one copy of named function when linking (weak)
+ AppendingLinkage, ///< Special purpose, only applies to global arrays
+ InternalLinkage, ///< Rename collisions when linking (static functions)
+ DLLImportLinkage, ///< Function to be imported from DLL
+ DLLExportLinkage, ///< Function to be accessible from DLL
+ ExternalWeakLinkage,///< ExternalWeak linkage description
+ GhostLinkage ///< Stand-in functions for streaming fns from BC files
};
+
+ /// @brief An enumeration for the kinds of visibility of global values.
enum VisibilityTypes {
- DefaultVisibility,
- HiddenVisibility
+ DefaultVisibility, ///< The GV is visible
+ HiddenVisibility ///< The GV is hidden
};
+
protected:
GlobalValue(const Type *Ty, ValueTy vty, Use *Ops, unsigned NumOps,
LinkageTypes linkage, const std::string &name = "")
@@ -91,7 +95,7 @@ public:
bool hasInternalLinkage() const { return Linkage == InternalLinkage; }
bool hasDLLImportLinkage() const { return Linkage == DLLImportLinkage; }
bool hasDLLExportLinkage() const { return Linkage == DLLExportLinkage; }
- bool hasExternalWeakLinkage() const { return Linkage == ExternalWeakLinkage; }
+ bool hasExternalWeakLinkage() const { return Linkage == ExternalWeakLinkage; }
void setLinkage(LinkageTypes LT) { Linkage = LT; }
LinkageTypes getLinkage() const { return Linkage; }