make getnext/getprev accessors private.
authorChris Lattner <sabre@nondot.org>
Tue, 17 Apr 2007 18:30:41 +0000 (18:30 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 17 Apr 2007 18:30:41 +0000 (18:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36209 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Function.h
include/llvm/GlobalVariable.h

index f78365085fba29eb63a5a2a614d281eb7a92f446..862edca9c7d2f4ed04f6510b44c81aaac185c8ed 100644 (file)
@@ -149,15 +149,6 @@ public:
   void eraseFromParent();
 
 
   void eraseFromParent();
 
 
-  // getNext/Prev - Return the next or previous function in the list.  These
-  // methods should never be used directly, and are only used to implement the
-  // function list as part of the module.
-  //
-        Function *getNext()       { return Next; }
-  const Function *getNext() const { return Next; }
-        Function *getPrev()       { return Prev; }
-  const Function *getPrev() const { return Prev; }
-
   /// Get the underlying elements of the Function... the basic block list is
   /// empty for external functions.
   ///
   /// Get the underlying elements of the Function... the basic block list is
   /// empty for external functions.
   ///
@@ -252,6 +243,15 @@ public:
     Function *Obj = 0;
     return unsigned(reinterpret_cast<uintptr_t>(&Obj->ArgumentList));
   }
     Function *Obj = 0;
     return unsigned(reinterpret_cast<uintptr_t>(&Obj->ArgumentList));
   }
+private:
+  // getNext/Prev - Return the next or previous function in the list.  These
+  // methods should never be used directly, and are only used to implement the
+  // function list as part of the module.
+  //
+  Function *getNext()             { return Next; }
+  const Function *getNext() const { return Next; }
+  Function *getPrev()             { return Prev; }
+  const Function *getPrev() const { return Prev; }
 };
 
 inline ValueSymbolTable *
 };
 
 inline ValueSymbolTable *
index ae3418bb8547c0c959c7b478e7e7083fae7ba48e..00d4acb66daf53d5886cc5af540a8bfa74f4f59e 100644 (file)
@@ -93,12 +93,6 @@ public:
     }
   }
 
     }
   }
 
-  // getNext/Prev - Return the next or previous global variable in the list.
-        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
   /// leads to undefined behavior.
   /// If the value is a global constant, its value is immutable throughout the
   /// runtime execution of the program.  Assigning a value into the constant
   /// leads to undefined behavior.
@@ -132,6 +126,12 @@ public:
   static inline bool classof(const Value *V) {
     return V->getValueID() == Value::GlobalVariableVal;
   }
   static inline bool classof(const Value *V) {
     return V->getValueID() == Value::GlobalVariableVal;
   }
+private:
+  // getNext/Prev - Return the next or previous global variable in the list.
+        GlobalVariable *getNext()       { return Next; }
+  const GlobalVariable *getNext() const { return Next; }
+        GlobalVariable *getPrev()       { return Prev; }
+  const GlobalVariable *getPrev() const { return Prev; }
 };
 
 } // End llvm namespace
 };
 
 } // End llvm namespace