Skip to content

Commit 63d82f6

Browse files
committed
no return no return capture
1 parent cd3dda7 commit 63d82f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Analysis/CaptureTracking.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ UseCaptureKind llvm::DetermineUseCaptureKind(
291291
// its return value and doesn't unwind (a readonly function can leak bits
292292
// by throwing an exception or not depending on the input value).
293293
if (Call->onlyReadsMemory() && Call->doesNotThrow() &&
294-
Call->getType()->isVoidTy())
294+
(Call->getType()->isVoidTy() || !Call->willReturn()))
295295
return UseCaptureKind::NO_CAPTURE;
296296

297297
// The pointer is not captured if returned pointer is not captured.

0 commit comments

Comments
 (0)