@@ -279,6 +279,21 @@ impl<'gcc, 'tcx> SignType<'gcc, 'tcx> for Type<'gcc> {
279279 else if self . is_u128 ( cx) {
280280 cx. i128_type
281281 }
282+ else if self . is_uchar ( cx) {
283+ cx. char_type
284+ }
285+ else if self . is_ushort ( cx) {
286+ cx. short_type
287+ }
288+ else if self . is_uint ( cx) {
289+ cx. int_type
290+ }
291+ else if self . is_ulong ( cx) {
292+ cx. long_type
293+ }
294+ else if self . is_ulonglong ( cx) {
295+ cx. longlong_type
296+ }
282297 else {
283298 self . clone ( )
284299 }
@@ -300,6 +315,21 @@ impl<'gcc, 'tcx> SignType<'gcc, 'tcx> for Type<'gcc> {
300315 else if self . is_i128 ( cx) {
301316 cx. u128_type
302317 }
318+ else if self . is_char ( cx) {
319+ cx. uchar_type
320+ }
321+ else if self . is_short ( cx) {
322+ cx. ushort_type
323+ }
324+ else if self . is_int ( cx) {
325+ cx. uint_type
326+ }
327+ else if self . is_long ( cx) {
328+ cx. ulong_type
329+ }
330+ else if self . is_longlong ( cx) {
331+ cx. ulonglong_type
332+ }
303333 else {
304334 self . clone ( )
305335 }
@@ -312,6 +342,11 @@ pub trait TypeReflection<'gcc, 'tcx> {
312342 fn is_uint ( & self , cx : & CodegenCx < ' gcc , ' tcx > ) -> bool ;
313343 fn is_ulong ( & self , cx : & CodegenCx < ' gcc , ' tcx > ) -> bool ;
314344 fn is_ulonglong ( & self , cx : & CodegenCx < ' gcc , ' tcx > ) -> bool ;
345+ fn is_char ( & self , cx : & CodegenCx < ' gcc , ' tcx > ) -> bool ;
346+ fn is_short ( & self , cx : & CodegenCx < ' gcc , ' tcx > ) -> bool ;
347+ fn is_int ( & self , cx : & CodegenCx < ' gcc , ' tcx > ) -> bool ;
348+ fn is_long ( & self , cx : & CodegenCx < ' gcc , ' tcx > ) -> bool ;
349+ fn is_longlong ( & self , cx : & CodegenCx < ' gcc , ' tcx > ) -> bool ;
315350
316351 fn is_i8 ( & self , cx : & CodegenCx < ' gcc , ' tcx > ) -> bool ;
317352 fn is_u8 ( & self , cx : & CodegenCx < ' gcc , ' tcx > ) -> bool ;
@@ -332,11 +367,11 @@ pub trait TypeReflection<'gcc, 'tcx> {
332367
333368impl < ' gcc , ' tcx > TypeReflection < ' gcc , ' tcx > for Type < ' gcc > {
334369 fn is_uchar ( & self , cx : & CodegenCx < ' gcc , ' tcx > ) -> bool {
335- self . unqualified ( ) == cx. u8_type
370+ self . unqualified ( ) == cx. uchar_type
336371 }
337372
338373 fn is_ushort ( & self , cx : & CodegenCx < ' gcc , ' tcx > ) -> bool {
339- self . unqualified ( ) == cx. u16_type
374+ self . unqualified ( ) == cx. ushort_type
340375 }
341376
342377 fn is_uint ( & self , cx : & CodegenCx < ' gcc , ' tcx > ) -> bool {
@@ -351,6 +386,26 @@ impl<'gcc, 'tcx> TypeReflection<'gcc, 'tcx> for Type<'gcc> {
351386 self . unqualified ( ) == cx. ulonglong_type
352387 }
353388
389+ fn is_char ( & self , cx : & CodegenCx < ' gcc , ' tcx > ) -> bool {
390+ self . unqualified ( ) == cx. char_type
391+ }
392+
393+ fn is_short ( & self , cx : & CodegenCx < ' gcc , ' tcx > ) -> bool {
394+ self . unqualified ( ) == cx. short_type
395+ }
396+
397+ fn is_int ( & self , cx : & CodegenCx < ' gcc , ' tcx > ) -> bool {
398+ self . unqualified ( ) == cx. int_type
399+ }
400+
401+ fn is_long ( & self , cx : & CodegenCx < ' gcc , ' tcx > ) -> bool {
402+ self . unqualified ( ) == cx. long_type
403+ }
404+
405+ fn is_longlong ( & self , cx : & CodegenCx < ' gcc , ' tcx > ) -> bool {
406+ self . unqualified ( ) == cx. longlong_type
407+ }
408+
354409 fn is_i8 ( & self , cx : & CodegenCx < ' gcc , ' tcx > ) -> bool {
355410 self . unqualified ( ) == cx. i8_type
356411 }
0 commit comments