Make SymbolTable::insert, SymbolTable::remove and SymbolTable::rename private.
authorChris Lattner <sabre@nondot.org>
Wed, 7 Feb 2007 06:06:24 +0000 (06:06 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 7 Feb 2007 06:06:24 +0000 (06:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33987 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ValueSymbolTable.h

index edc44901b5dc372b59c5fea7e270c0e3da1c3f15..501e04f59258704246e011122ffdf0f1b16f2c11 100644 (file)
 #include <map>
 
 namespace llvm {
-
+  template<typename ValueSubClass, typename ItemParentClass,
+           typename SymTabClass, typename SubClass>
+        class SymbolTableListTraits;
+  template<typename NodeTy> struct ilist_traits;
+  class BasicBlock;
+  class Function;
+  class Module;
+  
 /// This class provides a symbol table of name/value pairs. It is essentially
 /// a std::map<std::string,Value*> but has a controlled interface provided by
 /// LLVM as well as ensuring uniqueness of names.
 ///
 class ValueSymbolTable {
-
+  friend class Value;
+  friend class SymbolTableListTraits<Argument, Function, Function,
+                                     ilist_traits<Argument> >;
+  friend class SymbolTableListTraits<BasicBlock, Function, Function,
+                                     ilist_traits<BasicBlock> >;
+  friend class SymbolTableListTraits<Instruction, BasicBlock, Function,
+                                     ilist_traits<Instruction> >;
+  friend class SymbolTableListTraits<Function, Module, Module, 
+                                     ilist_traits<Function> >;
+  friend class SymbolTableListTraits<GlobalVariable, Module, Module, 
+                                     ilist_traits<GlobalVariable> >;
 /// @name Types
 /// @{
 public:
@@ -108,7 +125,8 @@ public:
   /// This method will strip the symbol table of its names.
   /// @brief Strip the symbol table.
   bool strip();
-
+  
+private:
   /// This method adds the provided value \p N to the symbol table.  The Value
   /// must have a name which is used to place the value in the symbol table. 
   /// @brief Add a named value to the symbol table