forked from OSchip/llvm-project
Make SlotCalculator::getPlane an inline function. It is used inside loops.
llvm-svn: 34091
This commit is contained in:
parent
ba09f90ddc
commit
ca444882bd
|
@ -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.
|
||||
//
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue