[llvm-commits] CVS: llvm/include/llvm/Function.h SymbolTable.h

Chris Lattner lattner at cs.uiuc.edu
Tue Oct 15 16:27:01 PDT 2002


Changes in directory llvm/include/llvm:

Function.h updated: 1.37 -> 1.38
SymbolTable.h updated: 1.18 -> 1.19

---
Log message:

  - Eliminate SymbolTable::ParentSymTab, ST::localLookup, and
    Function::ParentSymTab.  These aren't needed at all.



---
Diffs of the changes:

Index: llvm/include/llvm/Function.h
diff -u llvm/include/llvm/Function.h:1.37 llvm/include/llvm/Function.h:1.38
--- llvm/include/llvm/Function.h:1.37	Wed Oct  9 18:11:32 2002
+++ llvm/include/llvm/Function.h	Tue Oct 15 16:26:24 2002
@@ -57,7 +57,7 @@
   BasicBlockListType  BasicBlocks;      // The basic blocks
   ArgumentListType ArgumentList;        // The formal arguments
 
-  SymbolTable *SymTab, *ParentSymTab;
+  SymbolTable *SymTab;
   
   friend class SymbolTableListTraits<Function, Module, Module>;
 


Index: llvm/include/llvm/SymbolTable.h
diff -u llvm/include/llvm/SymbolTable.h:1.18 llvm/include/llvm/SymbolTable.h:1.19
--- llvm/include/llvm/SymbolTable.h:1.18	Sun Apr 28 14:49:58 2002
+++ llvm/include/llvm/SymbolTable.h	Tue Oct 15 16:26:24 2002
@@ -25,32 +25,15 @@
 public:
   typedef std::map<const std::string, Value *> VarMap;
   typedef std::map<const Type *, VarMap> super;
-private:
 
-  SymbolTable *ParentSymTab;
-
-  friend class Function;
-  inline void setParentSymTab(SymbolTable *P) { ParentSymTab = P; }
-
-public:
   typedef VarMap::iterator type_iterator;
   typedef VarMap::const_iterator type_const_iterator;
 
-  inline SymbolTable(SymbolTable *P = 0) {
-    ParentSymTab = P;
-    InternallyInconsistent = false;
-  }
+  inline SymbolTable() : InternallyInconsistent(false) {}
   ~SymbolTable();
 
-  SymbolTable *getParentSymTab() { return ParentSymTab; }
-
   // lookup - Returns null on failure...
   Value *lookup(const Type *Ty, const std::string &name);
-
-  // localLookup - Look in this symbol table without falling back on parent,
-  // if non-existing.  Returns null on failure...
-  //
-  Value *localLookup(const Type *Ty, const std::string &name);
 
   // insert - Add named definition to the symbol table...
   inline void insert(Value *N) {





More information about the llvm-commits mailing list