Make SlotCalculator::getPlane an inline function. It is used inside loops.
authorReid Spencer <rspencer@reidspencer.com>
Fri, 9 Feb 2007 15:25:50 +0000 (15:25 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Fri, 9 Feb 2007 15:25:50 +0000 (15:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34091 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Bytecode/Writer/SlotCalculator.cpp
lib/Bytecode/Writer/SlotCalculator.h

index 478216d145d8abb8900873a377cb61b17fc217cb..847727a4e258786455d9854af8c12a6b761997e5 100644 (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.
 //
index 353a97a1d1aa314c55d4fff066239ce9f56690a3..f44540c4c5e715432db9b61f1ef67b79d72d6077 100644 (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,