forked from OSchip/llvm-project
insertvalue's second operand is always false
llvm-svn: 34115
This commit is contained in:
parent
ee030194f9
commit
dcb209ac9c
|
@ -370,19 +370,15 @@ int SlotCalculator::getOrCreateSlot(const Value *V) {
|
||||||
return insertValue(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(V && "Can't insert a null value!");
|
||||||
assert(getSlot(V) == -1 && "Value is already in the table!");
|
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
|
// If this node does not contribute to a plane, ignore the node.
|
||||||
// name and we don't want names, then ignore the silly node... Note that types
|
if (V->getType() == Type::VoidTy) { // Ignore void type nodes
|
||||||
// do need slot numbers so that we can keep track of where other values land.
|
SC_DEBUG("ignored value " << *V << "\n");
|
||||||
//
|
return -1;
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
// Okay, everything is happy, actually insert the silly value now...
|
// Okay, everything is happy, actually insert the silly value now...
|
||||||
return doInsertValue(V);
|
return doInsertValue(V);
|
||||||
|
|
|
@ -122,7 +122,7 @@ private:
|
||||||
// slot that it occupies, or -1 if the declaration is to be ignored
|
// slot that it occupies, or -1 if the declaration is to be ignored
|
||||||
// because of the IgnoreNamedNodes flag.
|
// because of the IgnoreNamedNodes flag.
|
||||||
//
|
//
|
||||||
int insertValue(const Value *D, bool dontIgnore = false);
|
int insertValue(const Value *V);
|
||||||
int insertType(const Type *T);
|
int insertType(const Type *T);
|
||||||
|
|
||||||
// doInsertValue - Small helper function to be called only be insertVal.
|
// doInsertValue - Small helper function to be called only be insertVal.
|
||||||
|
|
Loading…
Reference in New Issue