mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-13 19:40:26 +00:00
Comparing a pointer with null is not a capture.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89389 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b83012a180
commit
2a0fab118f
@ -98,6 +98,11 @@ bool llvm::PointerMayBeCaptured(const Value *V, bool ReturnCaptures) {
|
|||||||
Worklist.push_back(U);
|
Worklist.push_back(U);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case Instruction::ICmp:
|
||||||
|
// Comparing the pointer against null does not count as a capture.
|
||||||
|
if (isa<ConstantPointerNull>(I->getOperand(1)))
|
||||||
|
break;
|
||||||
|
return true;
|
||||||
default:
|
default:
|
||||||
// Something else - be conservative and say it is captured.
|
// Something else - be conservative and say it is captured.
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user