Changes in directory llvm/lib/VMCore:
AsmWriter.cpp updated: 1.240 -> 1.241 --- Log message: eliminate some iterator gymnastics. --- Diffs of the changes: (+4 -8) AsmWriter.cpp | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) Index: llvm/lib/VMCore/AsmWriter.cpp diff -u llvm/lib/VMCore/AsmWriter.cpp:1.240 llvm/lib/VMCore/AsmWriter.cpp:1.241 --- llvm/lib/VMCore/AsmWriter.cpp:1.240 Tue Jan 9 02:04:59 2007 +++ llvm/lib/VMCore/AsmWriter.cpp Wed Jan 10 00:43:26 2007 @@ -1541,10 +1541,8 @@ unsigned DestSlot = 0; const Type *VTy = V->getType(); - TypedPlanes::iterator I = mMap.find(VTy); - if (I == mMap.end()) - I = mMap.insert(std::make_pair(VTy,ValuePlane())).first; - DestSlot = I->second.map[V] = I->second.next_slot++; + ValuePlane &PlaneMap = mMap[VTy]; + DestSlot = PlaneMap.map[V] = PlaneMap.next_slot++; SC_DEBUG(" Inserting value [" << VTy << "] = " << V << " slot=" << DestSlot << " ["); @@ -1560,10 +1558,8 @@ unsigned DestSlot = 0; - TypedPlanes::iterator I = fMap.find(VTy); - if (I == fMap.end()) - I = fMap.insert(std::make_pair(VTy,ValuePlane())).first; - DestSlot = I->second.map[V] = I->second.next_slot++; + ValuePlane &PlaneMap = fMap[VTy]; + DestSlot = PlaneMap.map[V] = PlaneMap.next_slot++; // G = Global, F = Function, o = other SC_DEBUG(" Inserting value [" << VTy << "] = " << V << " slot=" << _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits