mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-23 12:08:25 +00:00
Refine this to only apply to null in the default address space.
llvm-svn: 89411
This commit is contained in:
parent
29eef4f15a
commit
8154e3118a
@ -107,8 +107,10 @@ bool llvm::PointerMayBeCaptured(const Value *V,
|
||||
break;
|
||||
case Instruction::ICmp:
|
||||
// Comparing the pointer against null does not count as a capture.
|
||||
if (isa<ConstantPointerNull>(I->getOperand(1)))
|
||||
break;
|
||||
if (ConstantPointerNull *CPN =
|
||||
dyn_cast<ConstantPointerNull>(I->getOperand(1)))
|
||||
if (CPN->getType()->getAddressSpace() == 0)
|
||||
break;
|
||||
return true;
|
||||
default:
|
||||
// Something else - be conservative and say it is captured.
|
||||
|
Loading…
Reference in New Issue
Block a user