aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/GlobalVariable.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-06-25 16:12:52 +0000
committerChris Lattner <sabre@nondot.org>2002-06-25 16:12:52 +0000
commit18961504fc2b299578dba817900a0696cf3ccc4d (patch)
treec34853ffc064b841932d0897e25305c81c3a7338 /include/llvm/GlobalVariable.h
parenta2204e1ff25265a1da00ecbb3ebb22c05acf7194 (diff)
downloadexternal_llvm-18961504fc2b299578dba817900a0696cf3ccc4d.zip
external_llvm-18961504fc2b299578dba817900a0696cf3ccc4d.tar.gz
external_llvm-18961504fc2b299578dba817900a0696cf3ccc4d.tar.bz2
*** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2777 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/GlobalVariable.h')
-rw-r--r--include/llvm/GlobalVariable.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/llvm/GlobalVariable.h b/include/llvm/GlobalVariable.h
index 79507a5..2e2dd2b 100644
--- a/include/llvm/GlobalVariable.h
+++ b/include/llvm/GlobalVariable.h
@@ -17,11 +17,19 @@
class Module;
class Constant;
class PointerType;
+template<typename SC> struct ilist_traits;
+template<typename ValueSubClass, typename ItemParentClass, typename SymTabClass,
+ typename SubClass> class SymbolTableListTraits;
class GlobalVariable : public GlobalValue {
- friend class ValueHolder<GlobalVariable, Module, Module>;
+ friend class SymbolTableListTraits<GlobalVariable, Module, Module,
+ ilist_traits<GlobalVariable> >;
void setParent(Module *parent) { Parent = parent; }
+ GlobalVariable *Prev, *Next;
+ void setNext(GlobalVariable *N) { Next = N; }
+ void setPrev(GlobalVariable *N) { Prev = N; }
+
bool isConstantGlobal; // Is this a global constant?
public:
GlobalVariable(const Type *Ty, bool isConstant, bool isInternal,
@@ -52,6 +60,12 @@ public:
}
}
+ // getNext/Prev - Return the next or previous instruction in the list. The
+ // last node in the list is a terminator instruction.
+ GlobalVariable *getNext() { return Next; }
+ const GlobalVariable *getNext() const { return Next; }
+ GlobalVariable *getPrev() { return Prev; }
+ const GlobalVariable *getPrev() const { return Prev; }
// If the value is a global constant, its value is immutable throughout the
// runtime execution of the program. Assigning a value into the constant