[all-commits] [llvm/llvm-project] 86c65f: [WebAssembly] Correctly check end_if/end_try with ...

Heejin Ahn via All-commits all-commits at lists.llvm.org
Tue Apr 11 02:08:08 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 86c65fc4aa783071925e92340585456d7580dbf6
      https://github.com/llvm/llvm-project/commit/86c65fc4aa783071925e92340585456d7580dbf6
  Author: Heejin Ahn <aheejin at gmail.com>
  Date:   2023-04-11 (Tue, 11 Apr 2023)

  Changed paths:
    M llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
    M llvm/test/MC/WebAssembly/type-checker-errors.s

  Log Message:
  -----------
  [WebAssembly] Correctly check end_if/end_try with else/catch

When we encounter an `else`, `catch`, or `catch_all`, we currently just
push the structure `NestingType` and don't preserve the original `if`
and `try`'s signature. So after we pass `else`/`catch`/`catch_all`, we
can't check if the values on stack have the correct types when we
encounter `end_if` or `end_try`. This CL fixes the issue, and modifies
the existing test to be correct (some of them had `try` without
`catch`).

Reviewed By: dschuff

Differential Revision: https://reviews.llvm.org/D147881




More information about the All-commits mailing list