File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
compiler/cbmc/src/goto_program Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -369,6 +369,20 @@ impl Type {
369
369
}
370
370
}
371
371
372
+ pub fn is_c_size_t ( & self ) -> bool {
373
+ match self {
374
+ Type :: CInteger ( CIntType :: SizeT ) => true ,
375
+ _ => false ,
376
+ }
377
+ }
378
+
379
+ pub fn is_c_ssize_t ( & self ) -> bool {
380
+ match self {
381
+ Type :: CInteger ( CIntType :: SSizeT ) => true ,
382
+ _ => false ,
383
+ }
384
+ }
385
+
372
386
pub fn is_code ( & self ) -> bool {
373
387
match self {
374
388
Code { .. } => true ,
@@ -620,6 +634,14 @@ impl Type {
620
634
CInteger ( CIntType :: Int )
621
635
}
622
636
637
+ pub fn c_size_t ( ) -> Self {
638
+ CInteger ( CIntType :: SizeT )
639
+ }
640
+
641
+ pub fn c_ssize_t ( ) -> Self {
642
+ CInteger ( CIntType :: SSizeT )
643
+ }
644
+
623
645
/// corresponds to [code_typet] in CBMC, representing a function type
624
646
/// ret (params ..)
625
647
pub fn code ( parameters : Vec < Parameter > , return_type : Type ) -> Self {
You can’t perform that action at this time.
0 commit comments