Skip to content

Commit eee6f1c

Browse files
committed
[NFC] Fix variable name.
Deallocation has an address to be deallocated, not a size.
1 parent 74fe8ae commit eee6f1c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Transforms/Coroutines/Coroutines.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -569,13 +569,13 @@ void coro::Shape::emitDealloc(IRBuilder<> &Builder, Value *Ptr,
569569
case coro::ABI::RetconOnceDynamic: {
570570
auto Dealloc = RetconLowering.Dealloc;
571571
SmallVector<Value *, 2> Args;
572-
unsigned sizeParamIndex = 0;
572+
unsigned allocationParamIndex = 0;
573573
if (ABI == coro::ABI::RetconOnceDynamic) {
574-
sizeParamIndex = 1;
574+
allocationParamIndex = 1;
575575
Args.push_back(RetconLowering.Allocator);
576576
}
577577
Ptr = Builder.CreateBitCast(
578-
Ptr, Dealloc->getFunctionType()->getParamType(sizeParamIndex));
578+
Ptr, Dealloc->getFunctionType()->getParamType(allocationParamIndex));
579579
Args.push_back(Ptr);
580580
auto *Call = Builder.CreateCall(Dealloc, Args);
581581
propagateCallAttrsFromCallee(Call, Dealloc);

0 commit comments

Comments
 (0)