summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Module.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-03-08 06:16:10 +0000
committerChris Lattner <sabre@nondot.org>2004-03-08 06:16:10 +0000
commitc3ecaae16ca975875b50b52576306ff68eb37873 (patch)
treee3075ac2aa7a7e864463191080b19b97168cc945 /llvm/lib/VMCore/Module.cpp
parent8301a593a939a96451bedc7b63427a9ce0391cd9 (diff)
downloadbcm5719-llvm-c3ecaae16ca975875b50b52576306ff68eb37873.tar.gz
bcm5719-llvm-c3ecaae16ca975875b50b52576306ff68eb37873.zip
Remove Module::mutateConstantPointerRef, which is now thankfully dead!
This is one small step towards the complete obliteration of ConstantPointerRef's entirely!! Woot! llvm-svn: 12216
Diffstat (limited to 'llvm/lib/VMCore/Module.cpp')
-rw-r--r--llvm/lib/VMCore/Module.cpp25
1 files changed, 0 insertions, 25 deletions
diff --git a/llvm/lib/VMCore/Module.cpp b/llvm/lib/VMCore/Module.cpp
index f481a0d8c88..2c1b39fe5ea 100644
--- a/llvm/lib/VMCore/Module.cpp
+++ b/llvm/lib/VMCore/Module.cpp
@@ -335,28 +335,3 @@ void Module::destroyConstantPointerRef(ConstantPointerRef *CPR) {
GVRefMap = 0;
}
}
-
-void Module::mutateConstantPointerRef(GlobalValue *OldGV, GlobalValue *NewGV) {
- assert(OldGV != NewGV && "Cannot mutate to the same global!");
- GlobalValueRefMap::iterator I = GVRefMap->Map.find(OldGV);
- assert(I != GVRefMap->Map.end() &&
- "mutateConstantPointerRef; OldGV not in table!");
- ConstantPointerRef *Ref = I->second;
-
- // Remove the old entry...
- GVRefMap->Map.erase(I);
-
- // Check to see if a CPR already exists for NewGV
- I = GVRefMap->Map.lower_bound(NewGV);
-
- if (I == GVRefMap->Map.end() || I->first != NewGV) {
- // Insert the new entry...
- GVRefMap->Map.insert(I, std::make_pair(NewGV, Ref));
- } else {
- // Otherwise, an entry already exists for the current global value.
- // Completely replace the old CPR with the existing one...
- Ref->replaceAllUsesWith(I->second);
- delete Ref;
- }
-}
-
OpenPOWER on IntegriCloud