From: Reid Spencer Date: Fri, 9 Feb 2007 15:25:50 +0000 (+0000) Subject: Make SlotCalculator::getPlane an inline function. It is used inside loops. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=394355e4ccaf482f9c7eb412d714c50e0207758b;p=oota-llvm.git Make SlotCalculator::getPlane an inline function. It is used inside loops. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34091 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Bytecode/Writer/SlotCalculator.cpp b/lib/Bytecode/Writer/SlotCalculator.cpp index 478216d145d..847727a4e25 100644 --- a/lib/Bytecode/Writer/SlotCalculator.cpp +++ b/lib/Bytecode/Writer/SlotCalculator.cpp @@ -87,14 +87,6 @@ SlotCalculator::SlotCalculator(const Function *M ) { incorporateFunction(M); // Start out in incorporated state } -SlotCalculator::TypePlane &SlotCalculator::getPlane(unsigned Plane) { - // Okay we are just returning an entry out of the main Table. Make sure the - // plane exists and return it. - if (Plane >= Table.size()) - Table.resize(Plane+1); - return Table[Plane]; -} - // processModule - Process all of the module level function declarations and // types that are available. // diff --git a/lib/Bytecode/Writer/SlotCalculator.h b/lib/Bytecode/Writer/SlotCalculator.h index 353a97a1d1a..f44540c4c5e 100644 --- a/lib/Bytecode/Writer/SlotCalculator.h +++ b/lib/Bytecode/Writer/SlotCalculator.h @@ -87,7 +87,14 @@ public: return ModuleTypeLevel; } - TypePlane &getPlane(unsigned Plane); + TypePlane &getPlane(unsigned Plane) { + // Okay we are just returning an entry out of the main Table. Make sure the + // plane exists and return it. + if (Plane >= Table.size()) + Table.resize(Plane+1); + return Table[Plane]; + } + TypeList& getTypes() { return Types; } /// incorporateFunction/purgeFunction - If you'd like to deal with a function,