Skip to content

Commit 83a1fe8

Browse files
committed
[CaptureTracking] Convert check to assertion (NFC)
If it's not the callee operand, it must be a data operand.
1 parent a3fdc36 commit 83a1fe8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Analysis/CaptureTracking.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,8 @@ UseCaptureKind llvm::DetermineUseCaptureKind(
318318
return UseCaptureKind::NO_CAPTURE;
319319

320320
// Not captured if only passed via 'nocapture' arguments.
321-
if (Call->isDataOperand(&U) &&
322-
!Call->doesNotCapture(Call->getDataOperandNo(&U))) {
321+
assert(Call->isDataOperand(&U) && "Non-callee must be data operand");
322+
if (!Call->doesNotCapture(Call->getDataOperandNo(&U))) {
323323
// The parameter is not marked 'nocapture' - captured.
324324
return UseCaptureKind::MAY_CAPTURE;
325325
}

0 commit comments

Comments
 (0)