aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode/Writer/SlotCalculator.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-10 04:19:31 +0000
committerChris Lattner <sabre@nondot.org>2007-02-10 04:19:31 +0000
commit618181ea0e128fe7f9c394dc10ac1a497983e5a0 (patch)
tree8ae34347da648991c6c5a00e7e105f3ac22c6c81 /lib/Bytecode/Writer/SlotCalculator.cpp
parent330fce71b2bdaf85fba6972228ee310ebd9141a6 (diff)
insertvalue's second operand is always false
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34115 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Writer/SlotCalculator.cpp')
-rw-r--r--lib/Bytecode/Writer/SlotCalculator.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/Bytecode/Writer/SlotCalculator.cpp b/lib/Bytecode/Writer/SlotCalculator.cpp
index fe553e5bd1..a87bf104eb 100644
--- a/lib/Bytecode/Writer/SlotCalculator.cpp
+++ b/lib/Bytecode/Writer/SlotCalculator.cpp
@@ -370,19 +370,15 @@ int SlotCalculator::getOrCreateSlot(const Value *V) {
return insertValue(V);
}
-int SlotCalculator::insertValue(const Value *V, bool dontIgnore) {
+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, or if the node has a
- // name and we don't want names, then ignore the silly node... Note that types
- // do need slot numbers so that we can keep track of where other values land.
- //
- if (!dontIgnore) // Don't ignore nonignorables!
- if (V->getType() == Type::VoidTy) { // Ignore void type nodes
- SC_DEBUG("ignored value " << *V << "\n");
- return -1; // We do need types unconditionally though
- }
+ // If this node does not contribute to a plane, ignore the node.
+ if (V->getType() == Type::VoidTy) { // Ignore void type nodes
+ SC_DEBUG("ignored value " << *V << "\n");
+ return -1;
+ }
// Okay, everything is happy, actually insert the silly value now...
return doInsertValue(V);