Mercurial > projects > ldc
comparison gen/passes/GarbageCollect2Stack.cpp @ 1316:8c65217be813
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
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Fri, 08 May 2009 16:00:44 +0200 |
parents | e2ec50329af1 |
children | 4099548c80e0 |
comparison
equal
deleted
inserted
replaced
1315:c48dcf2e2c02 | 1316:8c65217be813 |
---|---|
345 MDNode* node = dyn_cast<MDNode>(global->getInitializer()); | 345 MDNode* node = dyn_cast<MDNode>(global->getInitializer()); |
346 if (!node) | 346 if (!node) |
347 return NULL; | 347 return NULL; |
348 | 348 |
349 if (node->getNumOperands() != TD_NumFields || | 349 if (node->getNumOperands() != TD_NumFields || |
350 node->getOperand(TD_Confirm)->stripPointerCasts() != ti_global) | 350 (TD_Confirm >= 0 && node->getOperand(TD_Confirm)->stripPointerCasts() != ti_global)) |
351 return NULL; | 351 return NULL; |
352 | 352 |
353 return node->getOperand(TD_Type)->getType(); | 353 return node->getOperand(TD_Type)->getType(); |
354 } | 354 } |
355 | 355 |