summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode/Writer
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
commitdcb209ac9c41ef4a38bbe2ab6ff4fb525b687056 (patch)
tree303e71f2a4d85465abac66d27ff67f71e469a4d6 /llvm/lib/Bytecode/Writer
parentee030194f952d0fcc17797d081272c82d38fb5d9 (diff)
downloadbcm5719-llvm-dcb209ac9c41ef4a38bbe2ab6ff4fb525b687056.tar.gz
bcm5719-llvm-dcb209ac9c41ef4a38bbe2ab6ff4fb525b687056.zip
insertvalue's second operand is always false
llvm-svn: 34115
Diffstat (limited to 'llvm/lib/Bytecode/Writer')
-rw-r--r--llvm/lib/Bytecode/Writer/SlotCalculator.cpp16
-rw-r--r--llvm/lib/Bytecode/Writer/SlotCalculator.h2
2 files changed, 7 insertions, 11 deletions
diff --git a/llvm/lib/Bytecode/Writer/SlotCalculator.cpp b/llvm/lib/Bytecode/Writer/SlotCalculator.cpp
index fe553e5bd12..a87bf104ebd 100644
--- a/llvm/lib/Bytecode/Writer/SlotCalculator.cpp
+++ b/llvm/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);
diff --git a/llvm/lib/Bytecode/Writer/SlotCalculator.h b/llvm/lib/Bytecode/Writer/SlotCalculator.h
index 75673182cd2..54249a73470 100644
--- a/llvm/lib/Bytecode/Writer/SlotCalculator.h
+++ b/llvm/lib/Bytecode/Writer/SlotCalculator.h
@@ -122,7 +122,7 @@ private:
// slot that it occupies, or -1 if the declaration is to be ignored
// because of the IgnoreNamedNodes flag.
//
- int insertValue(const Value *D, bool dontIgnore = false);
+ int insertValue(const Value *V);
int insertType(const Type *T);
// doInsertValue - Small helper function to be called only be insertVal.
OpenPOWER on IntegriCloud