diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-02-09 15:25:50 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-02-09 15:25:50 +0000 |
commit | 394355e4ccaf482f9c7eb412d714c50e0207758b (patch) | |
tree | 621542a6a600e15d784cec20d445cd6b5a5a92a6 /lib/Bytecode/Writer | |
parent | d748ea32dbb6a8c78c3181b9e8b117ee2514ab42 (diff) | |
download | external_llvm-394355e4ccaf482f9c7eb412d714c50e0207758b.zip external_llvm-394355e4ccaf482f9c7eb412d714c50e0207758b.tar.gz external_llvm-394355e4ccaf482f9c7eb412d714c50e0207758b.tar.bz2 |
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
Diffstat (limited to 'lib/Bytecode/Writer')
-rw-r--r-- | lib/Bytecode/Writer/SlotCalculator.cpp | 8 | ||||
-rw-r--r-- | lib/Bytecode/Writer/SlotCalculator.h | 9 |
2 files changed, 8 insertions, 9 deletions
diff --git a/lib/Bytecode/Writer/SlotCalculator.cpp b/lib/Bytecode/Writer/SlotCalculator.cpp index 478216d..847727a 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 353a97a..f44540c 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, |