Skip to content

Commit 82e594a

Browse files
committed
[AMDGPU] Remove unused lambda capture in AMDGPUMCResourceInfo.cpp (NFC)
/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUMCResourceInfo.cpp:26:16: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture] auto GOCS = [this, FuncName, &OutContext](StringRef Suffix) { ^~~~~ /llvm-project/llvm/lib/Target/AMDGPU/AMDGPUMCResourceInfo.cpp:64:27: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture] auto assignMaxRegSym = [this, &OutContext](MCSymbol *Sym, int32_t RegCount) { ^~~~~ 2 errors generated.
1 parent 8f50dbd commit 82e594a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/AMDGPU/AMDGPUMCResourceInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ using namespace llvm;
2323

2424
MCSymbol *MCResourceInfo::getSymbol(StringRef FuncName, ResourceInfoKind RIK,
2525
MCContext &OutContext) {
26-
auto GOCS = [this, FuncName, &OutContext](StringRef Suffix) {
26+
auto GOCS = [FuncName, &OutContext](StringRef Suffix) {
2727
return OutContext.getOrCreateSymbol(FuncName + Twine(Suffix));
2828
};
2929
switch (RIK) {
@@ -61,7 +61,7 @@ void MCResourceInfo::assignMaxRegs(MCContext &OutContext) {
6161
MCSymbol *MaxAGPRSym = getMaxAGPRSymbol(OutContext);
6262
MCSymbol *MaxSGPRSym = getMaxSGPRSymbol(OutContext);
6363

64-
auto assignMaxRegSym = [this, &OutContext](MCSymbol *Sym, int32_t RegCount) {
64+
auto assignMaxRegSym = [&OutContext](MCSymbol *Sym, int32_t RegCount) {
6565
const MCExpr *MaxExpr = MCConstantExpr::create(RegCount, OutContext);
6666
Sym->setVariableValue(MaxExpr);
6767
};

0 commit comments

Comments
 (0)