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 | ca444882bd2e8ebe7d43f277926d3a6fcd1a628c (patch) | |
tree | f3799d195c1a95016a6a455fb3b3db0067f09ce9 /llvm/lib/Bytecode | |
parent | ba09f90ddc0094bb87324ddd802520696aee048c (diff) | |
download | bcm5719-llvm-ca444882bd2e8ebe7d43f277926d3a6fcd1a628c.tar.gz bcm5719-llvm-ca444882bd2e8ebe7d43f277926d3a6fcd1a628c.zip |
Make SlotCalculator::getPlane an inline function. It is used inside loops.
llvm-svn: 34091
Diffstat (limited to 'llvm/lib/Bytecode')
-rw-r--r-- | llvm/lib/Bytecode/Writer/SlotCalculator.cpp | 8 | ||||
-rw-r--r-- | llvm/lib/Bytecode/Writer/SlotCalculator.h | 9 |
2 files changed, 8 insertions, 9 deletions
diff --git a/llvm/lib/Bytecode/Writer/SlotCalculator.cpp b/llvm/lib/Bytecode/Writer/SlotCalculator.cpp index 478216d145d..847727a4e25 100644 --- a/llvm/lib/Bytecode/Writer/SlotCalculator.cpp +++ b/llvm/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/llvm/lib/Bytecode/Writer/SlotCalculator.h b/llvm/lib/Bytecode/Writer/SlotCalculator.h index 353a97a1d1a..f44540c4c5e 100644 --- a/llvm/lib/Bytecode/Writer/SlotCalculator.h +++ b/llvm/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, |