Skip to content

Commit 160d46d

Browse files
[WebAssembly] Fix warnings
This patch fixes: llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp:126:26: error: lambda capture 'DAG' is not used [-Werror,-Wunused-lambda-capture] llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp:239:28: error: unused variable 'Info' [-Werror,-Wunused-variable]
1 parent 16b4fb5 commit 160d46d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ static SDValue getTagSymNode(int Tag, SelectionDAG *DAG) {
123123
static APInt encodeFunctionSignature(SelectionDAG *DAG, SDLoc &DL,
124124
SmallVector<MVT, 4> &Returns,
125125
SmallVector<MVT, 4> &Params) {
126-
auto toWasmValType = [&DAG, &DL](MVT VT) {
126+
auto toWasmValType = [&](MVT VT) {
127127
if (VT == MVT::i32) {
128128
return wasm::ValType::I32;
129129
}

llvm/lib/Target/WebAssembly/WebAssemblyMCInstLower.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ void WebAssemblyMCInstLower::lower(const MachineInstr *MI,
239239
const MCOperandInfo &Info = Operands[DescIndex];
240240
assert(Info.OperandType == WebAssembly::OPERAND_TYPEINDEX &&
241241
"unexpected CImmediate operand");
242+
(void)Info;
242243
MCOp = lowerEncodedFunctionSignature(MO.getCImm()->getValue());
243244
break;
244245
}

0 commit comments

Comments
 (0)