diff options
author | Chris Lattner <sabre@nondot.org> | 2001-10-15 13:21:42 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-10-15 13:21:42 +0000 |
commit | c18545dc9e5c8d98ea9089af8702a6cf563a8dfd (patch) | |
tree | 799d3124a0cdcfd27ed675e07adba38c3940fa68 /lib/VMCore | |
parent | 2a72820b43b94a4da0d51c1533b22ded37fc5c86 (diff) |
Rename ConstPoolPointerReference to ConstPoolPointerRef - My fingers get tired typing that much
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@822 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/ConstPoolVals.cpp | 14 | ||||
-rw-r--r-- | lib/VMCore/Linker.cpp | 5 | ||||
-rw-r--r-- | lib/VMCore/Module.cpp | 15 |
3 files changed, 16 insertions, 18 deletions
diff --git a/lib/VMCore/ConstPoolVals.cpp b/lib/VMCore/ConstPoolVals.cpp index 3b543cbcbe..e8d4f679fa 100644 --- a/lib/VMCore/ConstPoolVals.cpp +++ b/lib/VMCore/ConstPoolVals.cpp @@ -134,7 +134,7 @@ ConstPoolStruct::ConstPoolStruct(const StructType *T, } } -ConstPoolPointerReference::ConstPoolPointerReference(GlobalValue *GV) +ConstPoolPointerRef::ConstPoolPointerRef(GlobalValue *GV) : ConstPoolPointer(GV->getType()) { Operands.push_back(Use(GV, this)); } @@ -224,7 +224,7 @@ string ConstPoolPointerNull::getStrValue() const { return "null"; } -string ConstPoolPointerReference::getStrValue() const { +string ConstPoolPointerRef::getStrValue() const { const GlobalValue *V = getValue(); if (V->hasName()) return "%" + V->getName(); @@ -482,17 +482,17 @@ ConstPoolPointerNull *ConstPoolPointerNull::get(const PointerType *Ty) { return Result; } -//---- ConstPoolPointerReference::get() implementation... +//---- ConstPoolPointerRef::get() implementation... // -ConstPoolPointerReference *ConstPoolPointerReference::get(GlobalValue *GV) { +ConstPoolPointerRef *ConstPoolPointerRef::get(GlobalValue *GV) { assert(GV->getParent() && "Global Value must be attached to a module!"); // The Module handles the pointer reference sharing... - return GV->getParent()->getConstPoolPointerReference(GV); + return GV->getParent()->getConstPoolPointerRef(GV); } -void ConstPoolPointerReference::mutateReference(GlobalValue *NewGV) { - getValue()->getParent()->mutateConstPoolPointerReference(getValue(), NewGV); +void ConstPoolPointerRef::mutateReference(GlobalValue *NewGV) { + getValue()->getParent()->mutateConstPoolPointerRef(getValue(), NewGV); Operands[0] = NewGV; } diff --git a/lib/VMCore/Linker.cpp b/lib/VMCore/Linker.cpp index 9f36604f8c..33acbb4afb 100644 --- a/lib/VMCore/Linker.cpp +++ b/lib/VMCore/Linker.cpp @@ -64,10 +64,9 @@ static Value *RemapOperand(const Value *In, map<const Value*, Value*> &LocalMap, Result = ConstPoolStruct::get(cast<StructType>(CPS->getType()), Operands); } else if (isa<ConstPoolPointerNull>(CPV)) { Result = CPV; - } else if (ConstPoolPointerReference *CPR = - dyn_cast<ConstPoolPointerReference>(CPV)) { + } else if (ConstPoolPointerRef *CPR = dyn_cast<ConstPoolPointerRef>(CPV)) { Value *V = RemapOperand(CPR->getValue(), LocalMap, GlobalMap); - Result = ConstPoolPointerReference::get(cast<GlobalValue>(V)); + Result = ConstPoolPointerRef::get(cast<GlobalValue>(V)); } else { assert(0 && "Unknown type of derived type constant value!"); } diff --git a/lib/VMCore/Module.cpp b/lib/VMCore/Module.cpp index fbe8586714..7f5e3e246a 100644 --- a/lib/VMCore/Module.cpp +++ b/lib/VMCore/Module.cpp @@ -23,7 +23,7 @@ template class ValueHolder<Method, Module, Module>; // Define the GlobalValueRefMap as a struct that wraps a map so that we don't // have Module.h depend on <map> // -struct GlobalValueRefMap : public map<GlobalValue*, ConstPoolPointerReference*>{ +struct GlobalValueRefMap : public map<GlobalValue*, ConstPoolPointerRef*>{ }; @@ -62,7 +62,7 @@ void Module::dropAllReferences() { if (GVRefMap) { for (GlobalValueRefMap::iterator I = GVRefMap->begin(), E = GVRefMap->end(); I != E; ++I) { - // Delete the ConstPoolPointerReference node... + // Delete the ConstPoolPointerRef node... I->second->destroyConstant(); } @@ -88,25 +88,24 @@ bool Module::reduceApply(bool (*Func)(const Method*)) const { } // Accessor for the underlying GlobalValRefMap... -ConstPoolPointerReference *Module::getConstPoolPointerReference(GlobalValue *V){ +ConstPoolPointerRef *Module::getConstPoolPointerRef(GlobalValue *V){ // Create ref map lazily on demand... if (GVRefMap == 0) GVRefMap = new GlobalValueRefMap(); GlobalValueRefMap::iterator I = GVRefMap->find(V); if (I != GVRefMap->end()) return I->second; - ConstPoolPointerReference *Ref = new ConstPoolPointerReference(V); + ConstPoolPointerRef *Ref = new ConstPoolPointerRef(V); GVRefMap->insert(make_pair(V, Ref)); return Ref; } -void Module::mutateConstPoolPointerReference(GlobalValue *OldGV, - GlobalValue *NewGV) { +void Module::mutateConstPoolPointerRef(GlobalValue *OldGV, GlobalValue *NewGV) { GlobalValueRefMap::iterator I = GVRefMap->find(OldGV); assert(I != GVRefMap->end() && - "mutateConstPoolPointerReference; OldGV not in table!"); - ConstPoolPointerReference *Ref = I->second; + "mutateConstPoolPointerRef; OldGV not in table!"); + ConstPoolPointerRef *Ref = I->second; // Remove the old entry... GVRefMap->erase(I); |