From ef9cf86eb0ded6f5460f5870bcb90530a7411a60 Mon Sep 17 00:00:00 2001 From: Alex Bradbury Date: Tue, 22 Mar 2022 16:24:05 +0000 Subject: [PATCH] [WebAssembly][NFC] Delete type checking logic for removed ref.null instruction D114979 changed the textual formal of ref.null - dropping ref.null in favour of ref.null_extern and ref.null_func. Therefore, the type checker no longer needs logic to handle "ref.null". Differential Revision: https://reviews.llvm.org/D122123 --- .../Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp b/llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp index d9f96d9a6419..fedc61100fc3 100644 --- a/llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp +++ b/llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmTypeCheck.cpp @@ -303,9 +303,6 @@ bool WebAssemblyAsmTypeCheck::typeCheck(SMLoc ErrorLoc, const MCInst &Inst) { // catch instruction pushes values whose types are specified in the tag's // "params" part Stack.insert(Stack.end(), Sig->Params.begin(), Sig->Params.end()); - } else if (Name == "ref.null") { - auto VT = static_cast(Inst.getOperand(0).getImm()); - Stack.push_back(VT); } else if (Name == "unreachable") { Unreachable = true; } else {