Removed tautological checks.

They were probably used during initial development of the
pass to be able to disable emission of the global reference
by setting TD_TypeInfo to -1.
This commit is contained in:
David Nadlinger
2013-06-07 02:45:44 +02:00
parent af699bd76e
commit 9fbad3c4ba
2 changed files with 5 additions and 4 deletions

View File

@@ -495,8 +495,9 @@ Type* Analysis::getTypeFor(Value* typeinfo) const {
if (node->getNumOperands() != TD_NumFields)
return NULL;
if (TD_TypeInfo >= 0 && (!node->getOperand(TD_TypeInfo) ||
node->getOperand(TD_TypeInfo)->stripPointerCasts() != ti_global))
Value* ti = node->getOperand(TD_TypeInfo);
if (!ti || ti->stripPointerCasts() != ti_global)
return NULL;
return node->getOperand(TD_Type)->getType();