File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -658,6 +658,9 @@ extern {
658
658
#[ cfg( feature="master" ) ]
659
659
pub fn gcc_jit_target_info_supports_128bit_int ( info : * mut gcc_jit_target_info ) -> c_int ;
660
660
661
+ #[ cfg( feature="master" ) ]
662
+ pub fn gcc_jit_target_info_supports_target_dependent_type ( info : * mut gcc_jit_target_info , ty : gcc_jit_types ) -> c_int ;
663
+
661
664
#[ cfg( feature="master" ) ]
662
665
pub fn gcc_jit_context_new_sizeof ( ctxt : * mut gcc_jit_context , typ : * mut gcc_jit_type ) -> * mut gcc_jit_rvalue ;
663
666
Original file line number Diff line number Diff line change @@ -383,6 +383,12 @@ impl<'ctx> Context<'ctx> {
383
383
}
384
384
}
385
385
386
+ /// Checks if a given type is supported by the build target.
387
+ #[ cfg( feature="master" ) ]
388
+ pub fn supports_target_dependent_type < ' a > ( & ' a self , c_type : CType ) -> bool {
389
+ self . get_target_info ( ) . supports_target_dependent_type ( c_type. to_sys ( ) )
390
+ }
391
+
386
392
pub fn new_int_type < ' a > ( & ' a self , num_bytes : i32 , signed : bool ) -> types:: Type < ' a > {
387
393
unsafe {
388
394
let ctx_ptr = get_ptr ( self ) ;
Original file line number Diff line number Diff line change @@ -40,6 +40,13 @@ impl TargetInfo {
40
40
gccjit_sys:: gcc_jit_target_info_supports_128bit_int ( self . ptr ) != 0
41
41
}
42
42
}
43
+
44
+ #[ cfg( feature="master" ) ]
45
+ pub fn supports_target_dependent_type ( & self , ty : gccjit_sys:: gcc_jit_types ) -> bool {
46
+ unsafe {
47
+ gccjit_sys:: gcc_jit_target_info_supports_target_dependent_type ( self . ptr , ty) != 0
48
+ }
49
+ }
43
50
}
44
51
45
52
impl Drop for TargetInfo {
You can’t perform that action at this time.
0 commit comments