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

Chris Lattner sabre at nondot.org
Tue Apr 17 11:30:58 PDT 2007



Changes in directory llvm/include/llvm:

GlobalVariable.h updated: 1.43 -> 1.44
Function.h updated: 1.79 -> 1.80
---
Log message:

make getnext/getprev accessors private.


---
Diffs of the changes:  (+15 -15)

 Function.h       |   18 +++++++++---------
 GlobalVariable.h |   12 ++++++------
 2 files changed, 15 insertions(+), 15 deletions(-)


Index: llvm/include/llvm/GlobalVariable.h
diff -u llvm/include/llvm/GlobalVariable.h:1.43 llvm/include/llvm/GlobalVariable.h:1.44
--- llvm/include/llvm/GlobalVariable.h:1.43	Tue Apr 17 13:15:04 2007
+++ llvm/include/llvm/GlobalVariable.h	Tue Apr 17 13:30:41 2007
@@ -93,12 +93,6 @@
     }
   }
 
-  // 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.
@@ -132,6 +126,12 @@
   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


Index: llvm/include/llvm/Function.h
diff -u llvm/include/llvm/Function.h:1.79 llvm/include/llvm/Function.h:1.80
--- llvm/include/llvm/Function.h:1.79	Tue Apr 17 00:33:04 2007
+++ llvm/include/llvm/Function.h	Tue Apr 17 13:30:41 2007
@@ -149,15 +149,6 @@
   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.
   ///
@@ -252,6 +243,15 @@
     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 *






More information about the llvm-commits mailing list