From c2a87d7e032f8e6c8cbe6ab4c7cfbb7f7996ca9f Mon Sep 17 00:00:00 2001 From: Jie Fu Date: Thu, 9 May 2024 20:14:30 +0800 Subject: [PATCH] [AMDGPU] Remove unused lambda capture (NFC) /llvm-project/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp:733:30: error: lambda capture 'Ctx' is not used [-Werror,-Wunused-lambda-capture] auto TryGetMCExprValue = [&Ctx](const MCExpr *Value, uint64_t &Res) -> bool { ~^~~ 1 error generated. --- llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp b/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp index de81904143b7b1..b7388ed9e85a85 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp @@ -730,7 +730,7 @@ void AMDGPUAsmPrinter::getSIProgramInfo(SIProgramInfo &ProgInfo, return MCConstantExpr::create(Value, Ctx); }; - auto TryGetMCExprValue = [&Ctx](const MCExpr *Value, uint64_t &Res) -> bool { + auto TryGetMCExprValue = [](const MCExpr *Value, uint64_t &Res) -> bool { int64_t Val; if (Value->evaluateAsAbsolute(Val)) { Res = Val;