[llvm-commits] [llvm] r55529 - in /llvm/trunk/include/llvm: Function.h GlobalAlias.h GlobalValue.h GlobalVariable.h

Daniel Dunbar daniel at zuster.org
Fri Aug 29 00:30:15 PDT 2008


Author: ddunbar
Date: Fri Aug 29 02:30:15 2008
New Revision: 55529

URL: http://llvm.org/viewvc/llvm-project?rev=55529&view=rev
Log:
Add GlobalValue::{removeFromParent,eraseFromParent}

Modified:
    llvm/trunk/include/llvm/Function.h
    llvm/trunk/include/llvm/GlobalAlias.h
    llvm/trunk/include/llvm/GlobalValue.h
    llvm/trunk/include/llvm/GlobalVariable.h

Modified: llvm/trunk/include/llvm/Function.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Function.h?rev=55529&r1=55528&r2=55529&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Function.h (original)
+++ llvm/trunk/include/llvm/Function.h Fri Aug 29 02:30:15 2008
@@ -228,12 +228,12 @@
   /// removeFromParent - This method unlinks 'this' from the containing module,
   /// but does not delete it.
   ///
-  void removeFromParent();
+  virtual void removeFromParent();
 
   /// eraseFromParent - This method unlinks 'this' from the containing module
   /// and deletes it.
   ///
-  void eraseFromParent();
+  virtual void eraseFromParent();
 
 
   /// Get the underlying elements of the Function... the basic block list is

Modified: llvm/trunk/include/llvm/GlobalAlias.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/GlobalAlias.h?rev=55529&r1=55528&r2=55529&view=diff

==============================================================================
--- llvm/trunk/include/llvm/GlobalAlias.h (original)
+++ llvm/trunk/include/llvm/GlobalAlias.h Fri Aug 29 02:30:15 2008
@@ -55,12 +55,12 @@
   /// removeFromParent - This method unlinks 'this' from the containing module,
   /// but does not delete it.
   ///
-  void removeFromParent();
+  virtual void removeFromParent();
 
   /// eraseFromParent - This method unlinks 'this' from the containing module
   /// and deletes it.
   ///
-  void eraseFromParent();
+  virtual void eraseFromParent();
 
   /// set/getAliasee - These methods retrive and set alias target.
   void setAliasee(Constant* GV);

Modified: llvm/trunk/include/llvm/GlobalValue.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/GlobalValue.h?rev=55529&r1=55528&r2=55529&view=diff

==============================================================================
--- llvm/trunk/include/llvm/GlobalValue.h (original)
+++ llvm/trunk/include/llvm/GlobalValue.h Fri Aug 29 02:30:15 2008
@@ -142,6 +142,14 @@
   /// value is outside of the current translation unit...
   virtual bool isDeclaration() const = 0;
 
+  /// removeFromParent - This method unlinks 'this' from the containing module,
+  /// but does not delete it.
+  virtual void removeFromParent() = 0;
+
+  /// eraseFromParent - This method unlinks 'this' from the containing module
+  /// and deletes it.
+  virtual void eraseFromParent() = 0;
+
   /// getParent - Get the module that this global value is contained inside
   /// of...
   inline Module *getParent() { return Parent; }

Modified: llvm/trunk/include/llvm/GlobalVariable.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/GlobalVariable.h?rev=55529&r1=55528&r2=55529&view=diff

==============================================================================
--- llvm/trunk/include/llvm/GlobalVariable.h (original)
+++ llvm/trunk/include/llvm/GlobalVariable.h Fri Aug 29 02:30:15 2008
@@ -122,12 +122,12 @@
   /// removeFromParent - This method unlinks 'this' from the containing module,
   /// but does not delete it.
   ///
-  void removeFromParent();
+  virtual void removeFromParent();
 
   /// eraseFromParent - This method unlinks 'this' from the containing module
   /// and deletes it.
   ///
-  void eraseFromParent();
+  virtual void eraseFromParent();
 
   /// Override Constant's implementation of this method so we can
   /// replace constant initializers.





More information about the llvm-commits mailing list