diff options
author | Chris Lattner <sabre@nondot.org> | 2004-03-08 06:16:10 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-03-08 06:16:10 +0000 |
commit | 2c56b55cf054f472ff644d15e4a7a7974bd1dab3 (patch) | |
tree | e5d3c804e1dc66ced0af2c31a448b5ad8ff630bf /lib/VMCore | |
parent | 807a7be38b23b17db95a23fc52ebebc1e6d6d133 (diff) | |
download | external_llvm-2c56b55cf054f472ff644d15e4a7a7974bd1dab3.zip external_llvm-2c56b55cf054f472ff644d15e4a7a7974bd1dab3.tar.gz external_llvm-2c56b55cf054f472ff644d15e4a7a7974bd1dab3.tar.bz2 |
Remove Module::mutateConstantPointerRef, which is now thankfully dead!
This is one small step towards the complete obliteration of
ConstantPointerRef's entirely!! Woot!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12216 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Module.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/lib/VMCore/Module.cpp b/lib/VMCore/Module.cpp index f481a0d..2c1b39f 100644 --- a/lib/VMCore/Module.cpp +++ b/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; - } -} - |