[llvm-commits] CVS: llvm/lib/Bytecode/Writer/SlotCalculator.cpp SlotCalculator.h

Chris Lattner sabre at nondot.org
Fri Feb 9 20:19:47 PST 2007



Changes in directory llvm/lib/Bytecode/Writer:

SlotCalculator.cpp updated: 1.86 -> 1.87
SlotCalculator.h updated: 1.31 -> 1.32
---
Log message:

insertvalue's second operand is always false


---
Diffs of the changes:  (+7 -11)

 SlotCalculator.cpp |   16 ++++++----------
 SlotCalculator.h   |    2 +-
 2 files changed, 7 insertions(+), 11 deletions(-)


Index: llvm/lib/Bytecode/Writer/SlotCalculator.cpp
diff -u llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.86 llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.87
--- llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.86	Fri Feb  9 22:17:41 2007
+++ llvm/lib/Bytecode/Writer/SlotCalculator.cpp	Fri Feb  9 22:19:31 2007
@@ -370,19 +370,15 @@
   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);


Index: llvm/lib/Bytecode/Writer/SlotCalculator.h
diff -u llvm/lib/Bytecode/Writer/SlotCalculator.h:1.31 llvm/lib/Bytecode/Writer/SlotCalculator.h:1.32
--- llvm/lib/Bytecode/Writer/SlotCalculator.h:1.31	Fri Feb  9 22:17:41 2007
+++ llvm/lib/Bytecode/Writer/SlotCalculator.h	Fri Feb  9 22:19:31 2007
@@ -122,7 +122,7 @@
   // 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.






More information about the llvm-commits mailing list