diff options
author | Chris Lattner <sabre@nondot.org> | 2002-09-06 21:31:57 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-09-06 21:31:57 +0000 |
commit | fab8c796f6754962f5732145248303e3a1f7b96b (patch) | |
tree | 55fff7df3671dcfddefa7d6d99eb74f01048048b /include/llvm/GlobalVariable.h | |
parent | 82f2f954fd5939dd906a48beaf56f625c4fbc8db (diff) | |
download | external_llvm-fab8c796f6754962f5732145248303e3a1f7b96b.zip external_llvm-fab8c796f6754962f5732145248303e3a1f7b96b.tar.gz external_llvm-fab8c796f6754962f5732145248303e3a1f7b96b.tar.bz2 |
* Clean up some comments
* Move code out of header file to .cpp files, to make future changes easier
* Add arguments to classes so that they can be automatically inserted into their
parent structure upon creation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3604 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/GlobalVariable.h')
-rw-r--r-- | include/llvm/GlobalVariable.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/llvm/GlobalVariable.h b/include/llvm/GlobalVariable.h index 2e2dd2b..fd5e3a6 100644 --- a/include/llvm/GlobalVariable.h +++ b/include/llvm/GlobalVariable.h @@ -24,7 +24,7 @@ template<typename ValueSubClass, typename ItemParentClass, typename SymTabClass, class GlobalVariable : public GlobalValue { friend class SymbolTableListTraits<GlobalVariable, Module, Module, ilist_traits<GlobalVariable> >; - void setParent(Module *parent) { Parent = parent; } + void setParent(Module *parent); GlobalVariable *Prev, *Next; void setNext(GlobalVariable *N) { Next = N; } @@ -32,9 +32,12 @@ class GlobalVariable : public GlobalValue { bool isConstantGlobal; // Is this a global constant? public: + /// GlobalVariable ctor - If a parent module is specified, the global is + /// automatically inserted into the end of the specified modules global list. + /// GlobalVariable(const Type *Ty, bool isConstant, bool isInternal, - Constant *Initializer = 0, const std::string &Name = ""); - ~GlobalVariable() {} + Constant *Initializer = 0, const std::string &Name = "", + Module *Parent = 0); // Specialize setName to handle symbol table majik... virtual void setName(const std::string &name, SymbolTable *ST = 0); |