Work around an LLVM bug by not referring to globals from metadata. This was

only used for consistency checking anyway.
For the LLVM bug, see http://llvm.org/PR4180 / http://llvm.org/PR4046
This commit is contained in:
Frits van Bommel
2009-05-08 16:00:44 +02:00
parent 5c29832ee7
commit adf1fd4d44
3 changed files with 7 additions and 3 deletions

View File

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