[lld] Ensure NoTrapAfterNoreturn is false for the wasm backend (PR #65876)
Heejin Ahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 20 17:05:18 PDT 2023
================
@@ -127,6 +127,7 @@ WebAssemblyTargetMachine::WebAssemblyTargetMachine(
// LLVM 'unreachable' to ISD::TRAP and then lower that to WebAssembly's
// 'unreachable' instructions which is meant for that case.
this->Options.TrapUnreachable = true;
+ this->Options.NoTrapAfterNoreturn = false;
----------------
aheejin wrote:
Even if you give `--no-trap-after-noreturn` to the command line, this line will override it. Is that a bug or your intention? If it is your intention, did you want to check if we can override it, i.e., ignore it, even if we are given `--no-trap-after-noreturn`, and was that the reason you added the command line flag? If that's the case I'm still not sure it's worth adding a flag, especially to the common file in `lib/CodeGen` that can be used by all targets. If this is not the case please let me know.
https://github.com/llvm/llvm-project/pull/65876
More information about the llvm-commits
mailing list