Add a convenince member function for appending strings to a module's
[oota-llvm.git] / include / llvm / Function.h
index c0984f636789daafe505cfe0681560b9e243ffcc..b3b9716d4dfdd741d1a2ffe00158b17db5168fab 100644 (file)
@@ -81,6 +81,15 @@ private:
   void setNext(Function *N) { Next = N; }
   void setPrev(Function *N) { Prev = N; }
 
+  // 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; }
+
 public:
   /// Function ctor - If the (optional) Module argument is specified, the
   /// function is automatically inserted into the end of the function list for
@@ -141,12 +150,12 @@ public:
   /// removeFromParent - This method unlinks 'this' from the containing module,
   /// but does not delete it.
   ///
-  virtual void removeFromParent();
+  void removeFromParent();
 
   /// eraseFromParent - This method unlinks 'this' from the containing module
   /// and deletes it.
   ///
-  virtual void eraseFromParent();
+  void eraseFromParent();
 
 
   /// Get the underlying elements of the Function... the basic block list is
@@ -243,15 +252,6 @@ public:
     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 *