diff options
author | Chris Lattner <sabre@nondot.org> | 2007-02-10 05:17:48 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-02-10 05:17:48 +0000 |
commit | 972b4dccaf554b2e9940293f2df55a16ef34fb66 (patch) | |
tree | c598b178520774e0e74ca051b12e0014ca37e9ca /lib/Bytecode/Writer/SlotCalculator.cpp | |
parent | a2bdad49c9c003c6fe7d4416090817a8466f2bb2 (diff) |
getTypeSlot can never fail
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34129 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Writer/SlotCalculator.cpp')
-rw-r--r-- | lib/Bytecode/Writer/SlotCalculator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Bytecode/Writer/SlotCalculator.cpp b/lib/Bytecode/Writer/SlotCalculator.cpp index 1693ec4681..172da73f13 100644 --- a/lib/Bytecode/Writer/SlotCalculator.cpp +++ b/lib/Bytecode/Writer/SlotCalculator.cpp @@ -284,10 +284,10 @@ unsigned SlotCalculator::getSlot(const Value *V) const { return (int)I->second; } -int SlotCalculator::getTypeSlot(const Type*T) const { +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 (int)I->second; + return I->second; } void SlotCalculator::CreateSlotIfNeeded(const Value *V) { |