summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode/Writer
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-10 04:25:02 +0000
committerChris Lattner <sabre@nondot.org>2007-02-10 04:25:02 +0000
commit0d549b217b2b7d43dcea3fad735b3ad09b018eec (patch)
treedfdc0b73dc278694e78f0fe0b1160f68e347b209 /llvm/lib/Bytecode/Writer
parent90a8f472da0c1fcd43e23acacfa9dcde0fe2388d (diff)
downloadbcm5719-llvm-0d549b217b2b7d43dcea3fad735b3ad09b018eec.tar.gz
bcm5719-llvm-0d549b217b2b7d43dcea3fad735b3ad09b018eec.zip
merge insertValue into its single caller, eliminate some redundant checks.
llvm-svn: 34117
Diffstat (limited to 'llvm/lib/Bytecode/Writer')
-rw-r--r--llvm/lib/Bytecode/Writer/SlotCalculator.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/llvm/lib/Bytecode/Writer/SlotCalculator.cpp b/llvm/lib/Bytecode/Writer/SlotCalculator.cpp
index 99e353cf525..0b148ec1767 100644
--- a/llvm/lib/Bytecode/Writer/SlotCalculator.cpp
+++ b/llvm/lib/Bytecode/Writer/SlotCalculator.cpp
@@ -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;
OpenPOWER on IntegriCloud