merge insertValue into its single caller, eliminate some redundant checks.
authorChris Lattner <sabre@nondot.org>
Sat, 10 Feb 2007 04:25:02 +0000 (04:25 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 10 Feb 2007 04:25:02 +0000 (04:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34117 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Bytecode/Writer/SlotCalculator.cpp

index 99e353cf5259456d1bd07339280d5e18ec375707..0b148ec1767ccf854748bdad7ce37eff8936d1b4 100644 (file)
@@ -367,19 +367,8 @@ int SlotCalculator::getOrCreateSlot(const Value *V) {
       }
     }
 
-  return insertValue(V);
-}
-
-int SlotCalculator::insertValue(const Value *V) {
-  assert(V && "Can't insert a null value!");
-  assert(getSlot(V) == -1 && "Value is already in the table!");
-
-  // If this node does not contribute to a plane, ignore the node.
   const Type *Typ = V->getType();
-  if (Typ == Type::VoidTy) {         // Ignore void type nodes
-    SC_DEBUG("ignored value " << *V << "\n");
-    return -1;
-  }
+  assert(Typ != Type::VoidTy && "Can't handle voidty");
 
   unsigned Ty;