- }
-}
-
-
-//===----------------------------------------------------------------------===//
-// SymTabValue Class
-//===----------------------------------------------------------------------===//
-
-// Instantiate Templates - This ugliness is the price we have to pay
-// for having a ValueHolderImpl.h file seperate from ValueHolder.h! :(
-//
-template class ValueHolder<ConstPoolVal, SymTabValue>;
-
-SymTabValue::SymTabValue(const Type *Ty, ValueTy dty, const string &name = "")
- : Value(Ty, dty, name), ConstPool(this) {
- ParentSymTab = SymTab = 0;
-}
-
-
-SymTabValue::~SymTabValue() {
- ConstPool.dropAllReferences();
- ConstPool.delete_all();
- ConstPool.setParent(0);
-
- delete SymTab;
-}
-
-void SymTabValue::setParentSymTab(SymbolTable *ST) {
- ParentSymTab = ST;
- if (SymTab)
- SymTab->setParentSymTab(ST);
-}
-
-SymbolTable *SymTabValue::getSymbolTableSure() {
- if (!SymTab) SymTab = new SymbolTable(ParentSymTab);
- return SymTab;
-}
-
-// hasSymbolTable() - Returns true if there is a symbol table allocated to
-// this object AND if there is at least one name in it!
-//
-bool SymTabValue::hasSymbolTable() const {
- if (!SymTab) return false;
-
- for (SymbolTable::const_iterator I = SymTab->begin();
- I != SymTab->end(); I++) {
- if (I->second.begin() != I->second.end())
- return true; // Found nonempty type plane!
- }
-
- return false;