Add GlobalValue::{removeFromParent,eraseFromParent}
authorDaniel Dunbar <daniel@zuster.org>
Fri, 29 Aug 2008 07:30:15 +0000 (07:30 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 29 Aug 2008 07:30:15 +0000 (07:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55529 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Function.h
include/llvm/GlobalAlias.h
include/llvm/GlobalValue.h
include/llvm/GlobalVariable.h

index f302ff570fc438e79eec39f900d28cb4d5fd1ba3..0e852e6ba1e2fa1acba627ca40de5925311d5362 100644 (file)
@@ -228,12 +228,12 @@ public:
   /// 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
index 4dfc9c4d5e04c0bdf503bec5d8c52055ff55560a..6dba21bf609637f49fca326f93b3ded51d505c69 100644 (file)
@@ -55,12 +55,12 @@ public:
   /// 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);
index 1fd899ae7b8aac0af98441fe8038e31a5f0f7955..f57b23f1d73d05c3e547650e6eb4551aa90ec6d6 100644 (file)
@@ -142,6 +142,14 @@ public:
   /// 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; }
index aae17e409daf7792904c146fa7b02454f0e236f7..1f9bfd4f5080fd2c003d6d71cdb92aaa76d0b8db 100644 (file)
@@ -122,12 +122,12 @@ public:
   /// 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.