1
Fork 0

Introduce perma-unstable wasm-c-abi flag

This commit is contained in:
daxpedda 2024-02-27 23:06:44 +01:00
parent 5bc7b9ac8a
commit f09c19ac3a
No known key found for this signature in database
GPG key ID: 43D62A3EA388E46F
10 changed files with 94 additions and 13 deletions

View file

@ -31,7 +31,7 @@ use rustc_span::Span;
use rustc_target::abi::{
self, call::FnAbi, Align, HasDataLayout, Size, TargetDataLayout, WrappingRange,
};
use rustc_target::spec::{HasTargetSpec, Target};
use rustc_target::spec::{HasTargetSpec, HasWasmCAbiOpt, Target, WasmCAbi};
use crate::common::{type_is_pointer, SignType, TypeReflection};
use crate::context::CodegenCx;
@ -2349,6 +2349,12 @@ impl<'tcx> HasTargetSpec for Builder<'_, '_, 'tcx> {
}
}
impl<'tcx> HasWasmCAbiOpt for Builder<'_, '_, 'tcx> {
fn wasm_c_abi_opt(&self) -> WasmCAbi {
self.cx.wasm_c_abi_opt()
}
}
pub trait ToGccComp {
fn to_gcc_comparison(&self) -> ComparisonOp;
}