Changes in directory llvm/lib/Bytecode/Writer:
SlotCalculator.cpp updated: 1.101 -> 1.102 SlotCalculator.h updated: 1.42 -> 1.43 --- Log message: make getSlot/getTypeSlot inline --- Diffs of the changes: (+11 -14) SlotCalculator.cpp | 12 ------------ SlotCalculator.h | 13 +++++++++++-- 2 files changed, 11 insertions(+), 14 deletions(-) Index: llvm/lib/Bytecode/Writer/SlotCalculator.cpp diff -u llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.101 llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.102 --- llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.101 Fri Feb 9 23:17:48 2007 +++ llvm/lib/Bytecode/Writer/SlotCalculator.cpp Fri Feb 9 23:18:35 2007 @@ -278,18 +278,6 @@ SC_DEBUG("end purgeFunction!\n"); } -unsigned SlotCalculator::getSlot(const Value *V) const { - std::map<const Value*, unsigned>::const_iterator I = NodeMap.find(V); - assert(I != NodeMap.end() && "Value not in slotcalculator!"); - return (int)I->second; -} - -unsigned SlotCalculator::getTypeSlot(const Type*T) const { - std::map<const Type*, unsigned>::const_iterator I = TypeMap.find(T); - assert(I != TypeMap.end() && "Type not in slotcalc!"); - return I->second; -} - void SlotCalculator::CreateSlotIfNeeded(const Value *V) { // Check to see if it's already in! if (NodeMap.count(V)) return; Index: llvm/lib/Bytecode/Writer/SlotCalculator.h diff -u llvm/lib/Bytecode/Writer/SlotCalculator.h:1.42 llvm/lib/Bytecode/Writer/SlotCalculator.h:1.43 --- llvm/lib/Bytecode/Writer/SlotCalculator.h:1.42 Fri Feb 9 23:17:48 2007 +++ llvm/lib/Bytecode/Writer/SlotCalculator.h Fri Feb 9 23:18:35 2007 @@ -65,8 +65,17 @@ /// getSlot - Return the slot number of the specified value in it's type /// plane. This returns < 0 on error! /// - unsigned getSlot(const Value *V) const; - unsigned getTypeSlot(const Type* T) const; + unsigned getSlot(const Value *V) const { + std::map<const Value*, unsigned>::const_iterator I = NodeMap.find(V); + assert(I != NodeMap.end() && "Value not in slotcalculator!"); + return I->second; + } + + unsigned getTypeSlot(const Type* T) const { + std::map<const Type*, unsigned>::const_iterator I = TypeMap.find(T); + assert(I != TypeMap.end() && "Type not in slotcalc!"); + return I->second; + } inline unsigned getNumPlanes() const { return Table.size(); } inline unsigned getNumTypes() const { return Types.size(); } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits