[llvm] 8294019 - Use default ref capture to avoid unused capture warning on assert-used variable
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 8 17:50:12 PDT 2021
Author: David Blaikie
Date: 2021-04-08T17:37:55-07:00
New Revision: 8294019633b527f3c5d529e9ae2bac1d5af66361
URL: https://github.com/llvm/llvm-project/commit/8294019633b527f3c5d529e9ae2bac1d5af66361
DIFF: https://github.com/llvm/llvm-project/commit/8294019633b527f3c5d529e9ae2bac1d5af66361.diff
LOG: Use default ref capture to avoid unused capture warning on assert-used variable
Added:
Modified:
llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp b/llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp
index 558f2d3ca690c..6da420b8e0dd5 100644
--- a/llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp
@@ -233,7 +233,7 @@ void NVPTXLowerArgs::handleByValParam(Argument *Arg) {
Type *StructType = PType->getElementType();
- auto IsALoadChain = [Arg](Value *Start) {
+ auto IsALoadChain = [&](Value *Start) {
SmallVector<Value *, 16> ValuesToCheck = {Start};
auto IsALoadChainInstr = [](Value *V) -> bool {
if (isa<GetElementPtrInst>(V) || isa<BitCastInst>(V) || isa<LoadInst>(V))
More information about the llvm-commits
mailing list