[clang-tools-extra] Ensure NoTrapAfterNoreturn is false for the wasm backend (PR #65876)

Heejin Ahn via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 4 23:10:42 PDT 2023


================
@@ -6,12 +6,8 @@
 ; "end_function" lines intact when you commit.
 
 
-; --trap-unreachable and --no-trap-after-noreturn are sensitive and bug-prone
-; options for the WebAssembly back-end as, unlike in many other target
-; architechtures, unreachable code being compiled to a trap instruction (i.e.
-; WebAssembly "unreachable" instruction) is often necessary for the code to
-; pass wasm's validation step. We test that various combinations of
-; these options produce the expected output.
+; The --trap-unreachable and --no-trap-after-noreturn options are ignored, and
+; should have no effect.
----------------
aheejin wrote:

```suggestion
; Wasm, to generate valid code, always internally sets `--trap-unreachable` to 1
; and `--no-trap-after-noreturn` to 0, and these command lines options, if
; explicitly given, are ignored. Various combinations of these options should
; have no effect and should not generate invalid code.
```

https://github.com/llvm/llvm-project/pull/65876


More information about the cfe-commits mailing list