[llvm-commits] CVS: llvm/lib/VMCore/Module.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Mar 8 00:17:03 PST 2004
Changes in directory llvm/lib/VMCore:
Module.cpp updated: 1.47 -> 1.48
---
Log message:
Remove Module::mutateConstantPointerRef, which is now thankfully dead!
This is one small step towards the complete obliteration of
ConstantPointerRef's entirely!! Woot!
---
Diffs of the changes: (+0 -25)
Index: llvm/lib/VMCore/Module.cpp
diff -u llvm/lib/VMCore/Module.cpp:1.47 llvm/lib/VMCore/Module.cpp:1.48
--- llvm/lib/VMCore/Module.cpp:1.47 Wed Dec 31 02:43:01 2003
+++ llvm/lib/VMCore/Module.cpp Mon Mar 8 00:16:10 2004
@@ -335,28 +335,3 @@
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;
- }
-}
-
More information about the llvm-commits
mailing list