Skip to content

Commit

Permalink
[AMDGPU] Remove unused lambda capture in AMDGPUMCResourceInfo.cpp (NFC)
Browse files Browse the repository at this point in the history
/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.
  • Loading branch information
DamonFool committed Sep 30, 2024
1 parent 8f50dbd commit 82e594a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/lib/Target/AMDGPU/AMDGPUMCResourceInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ using namespace llvm;

MCSymbol *MCResourceInfo::getSymbol(StringRef FuncName, ResourceInfoKind RIK,
MCContext &OutContext) {
auto GOCS = [this, FuncName, &OutContext](StringRef Suffix) {
auto GOCS = [FuncName, &OutContext](StringRef Suffix) {
return OutContext.getOrCreateSymbol(FuncName + Twine(Suffix));
};
switch (RIK) {
Expand Down Expand Up @@ -61,7 +61,7 @@ void MCResourceInfo::assignMaxRegs(MCContext &OutContext) {
MCSymbol *MaxAGPRSym = getMaxAGPRSymbol(OutContext);
MCSymbol *MaxSGPRSym = getMaxSGPRSymbol(OutContext);

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

0 comments on commit 82e594a

Please sign in to comment.