Skip to content

Commit 1393f4e

Browse files
committed
[MemCpyOpt] Use doesNotCapture() helper (NFC)
No difference in semantics here as byval is already handled separately. This simplifies migration to the captures attribute.
1 parent 0bd098b commit 1393f4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2010,7 +2010,7 @@ bool MemCpyOptPass::processImmutArgument(CallBase &CB, unsigned ArgNo) {
20102010
Value *ImmutArg = CB.getArgOperand(ArgNo);
20112011

20122012
// 1. Ensure passed argument is immutable during call.
2013-
if (!CB.paramHasAttr(ArgNo, Attribute::NoCapture))
2013+
if (!CB.doesNotCapture(ArgNo))
20142014
return false;
20152015

20162016
// We know that the argument is readonly at this point, but the function

0 commit comments

Comments
 (0)