mirror of
https://github.com/openharmony/third_party_rust_bindgen.git
synced 2026-07-21 07:05:24 -04:00
codegen: Simplify abi support condition.
This commit is contained in:
+8
-17
@@ -17,7 +17,6 @@ use self::struct_layout::StructLayoutTracker;
|
||||
|
||||
use super::BindgenOptions;
|
||||
|
||||
use crate::features::RustFeatures;
|
||||
use crate::ir::analysis::{HasVtable, Sizedness};
|
||||
use crate::ir::annotations::FieldAccessorKind;
|
||||
use crate::ir::comment;
|
||||
@@ -2415,22 +2414,14 @@ impl MethodCodegen for Method {
|
||||
_ => panic!("How in the world?"),
|
||||
};
|
||||
|
||||
match (signature.abi(), ctx.options().rust_features()) {
|
||||
(
|
||||
Abi::ThisCall,
|
||||
RustFeatures {
|
||||
thiscall_abi: false,
|
||||
..
|
||||
},
|
||||
) |
|
||||
(
|
||||
Abi::Vectorcall,
|
||||
RustFeatures {
|
||||
vectorcall_abi: false,
|
||||
..
|
||||
},
|
||||
) => return,
|
||||
_ => {}
|
||||
let supported_abi = match signature.abi() {
|
||||
Abi::ThisCall => ctx.options().rust_features().thiscall_abi,
|
||||
Abi::Vectorcall => ctx.options().rust_features().vectorcall_abi,
|
||||
_ => true,
|
||||
};
|
||||
|
||||
if !supported_abi {
|
||||
return;
|
||||
}
|
||||
|
||||
// Do not generate variadic methods, since rust does not allow
|
||||
|
||||
Reference in New Issue
Block a user