about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorJack Huey <31162821+jackh726@users.noreply.github.com>2021-02-02 16:01:38 -0500
committerGitHub <noreply@github.com>2021-02-02 16:01:38 -0500
commit76be6bb4de596ad24c62dd52baeb0cb56c8937ae (patch)
treebee4e8d6d81ac203d243a9a49276d3de41cedbfc /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent71792d822c713b66616b2b5dde1fa9cffe3ab21d (diff)
parentc7f4154c6a839d31abcbb74be4c9b2404ae3a2ec (diff)
downloadrust-76be6bb4de596ad24c62dd52baeb0cb56c8937ae.tar.gz
rust-76be6bb4de596ad24c62dd52baeb0cb56c8937ae.zip
Rollup merge of #81530 - ojeda:sys-use-abort-instead-of-wasm32-unreachable, r=Mark-Simulacrum
sys: use `process::abort()` instead of `arch::wasm32::unreachable()`

Rationale:

  - `abort()` lowers to `wasm32::unreachable()` anyway.
  - `abort()` isn't `unsafe`.
  - `abort()` matches the comment better.
  - `abort()` avoids confusion by future readers (e.g. https://github.com/rust-lang/rust/pull/81527): the naming of wasm's `unreachable` instruction is a bit unfortunate because it is not related to the `unreachable()` intrinsic (intended to trigger UB).

Codegen is likely to be different since `unreachable()` is `inline` while `abort()` is `cold`. Since it doesn't look like we are expecting here to trigger this case, the latter seems better anyway.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions