Remove extranous #include
[oota-llvm.git] / include / llvm / SymTabValue.h
1 //===-- llvm/SymTabValue.h - Implement SymbolTable Values --------*- C++ -*--=//
2 //
3 // This subclass of Value implements a def that has a symbol table for keeping
4 // track of children.  This is used by the ValueHolder template class...
5 //
6 //===----------------------------------------------------------------------===//
7
8 #ifndef LLVM_SYMTAB_VALUE_H
9 #define LLVM_SYMTAB_VALUE_H
10
11 class SymbolTable;
12 class Value;
13
14 class SymTabValue {
15 private:
16   SymbolTable *SymTab, *ParentSymTab;
17   Value *ValueParent;
18
19 protected:
20   void setParentSymTab(SymbolTable *ST);
21 public:
22   SymTabValue(Value *Parent);
23   ~SymTabValue();    // Implemented in Value.cpp
24
25   inline       Value *getSTVParent()       { return ValueParent; }
26   inline const Value *getSTVParent() const { return ValueParent; }
27
28   // hasSymbolTable() - Returns true if there is a symbol table allocated to
29   // this object AND if there is at least one name in it!
30   //
31   bool hasSymbolTable() const;
32
33   // CAUTION: The current symbol table may be null if there are no names (ie, 
34   // the symbol table is empty) 
35   //
36   inline       SymbolTable *getSymbolTable()       { return SymTab; }
37   inline const SymbolTable *getSymbolTable() const { return SymTab; }
38
39   // getSymbolTableSure is guaranteed to not return a null pointer, because if
40   // the method does not already have a symtab, one is created.  Use this if
41   // you intend to put something into the symbol table for the method.
42   //
43   SymbolTable *getSymbolTableSure();  // Implemented in Value.cpp
44 };
45
46 #endif