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
This commit is contained in:
Reid Spencer 2007-02-09 15:25:50 +00:00
parent d748ea32db
commit 394355e4cc
2 changed files with 8 additions and 9 deletions

View File

@ -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.
//

View File

@ -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,