aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-08-29 07:30:15 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-08-29 07:30:15 +0000
commit71c8c175fb2a477b90efe745aaf48ed9265300a9 (patch)
tree117427ea7d084bace38562601037f81b01465a98 /include/llvm
parent130966411f83469b1d9b93df831a2f2146bd400f (diff)
downloadexternal_llvm-71c8c175fb2a477b90efe745aaf48ed9265300a9.zip
external_llvm-71c8c175fb2a477b90efe745aaf48ed9265300a9.tar.gz
external_llvm-71c8c175fb2a477b90efe745aaf48ed9265300a9.tar.bz2
Add GlobalValue::{removeFromParent,eraseFromParent}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55529 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Function.h4
-rw-r--r--include/llvm/GlobalAlias.h4
-rw-r--r--include/llvm/GlobalValue.h8
-rw-r--r--include/llvm/GlobalVariable.h4
4 files changed, 14 insertions, 6 deletions
diff --git a/include/llvm/Function.h b/include/llvm/Function.h
index f302ff5..0e852e6 100644
--- a/include/llvm/Function.h
+++ b/include/llvm/Function.h
@@ -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
diff --git a/include/llvm/GlobalAlias.h b/include/llvm/GlobalAlias.h
index 4dfc9c4..6dba21b 100644
--- a/include/llvm/GlobalAlias.h
+++ b/include/llvm/GlobalAlias.h
@@ -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);
diff --git a/include/llvm/GlobalValue.h b/include/llvm/GlobalValue.h
index 1fd899a..f57b23f 100644
--- a/include/llvm/GlobalValue.h
+++ b/include/llvm/GlobalValue.h
@@ -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; }
diff --git a/include/llvm/GlobalVariable.h b/include/llvm/GlobalVariable.h
index aae17e4..1f9bfd4 100644
--- a/include/llvm/GlobalVariable.h
+++ b/include/llvm/GlobalVariable.h
@@ -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.