Add a hack for llvm.wasm.throw
As this is the only unwinding intrinsic we use and codegen_llvm_intrinsic_call currently doesn't handle unwinding intrinsics, this uses the conventional call path for llvm.wasm.throw.
This commit is contained in:
parent
9bcd6ed4c9
commit
cb23b54eb1
1 changed files with 4 additions and 0 deletions
|
|
@ -1039,6 +1039,10 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
if let Some(instance) = instance
|
||||
&& let Some(name) = bx.tcx().codegen_fn_attrs(instance.def_id()).symbol_name
|
||||
&& name.as_str().starts_with("llvm.")
|
||||
// This is the only LLVM intrinsic we use that unwinds
|
||||
// FIXME either add unwind support to codegen_llvm_intrinsic_call or replace usage of
|
||||
// this intrinsic with something else
|
||||
&& name.as_str() != "llvm.wasm.throw"
|
||||
{
|
||||
assert!(!instance.args.has_infer());
|
||||
assert!(!instance.args.has_escaping_bound_vars());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue