We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0cf0739 commit cd7713bCopy full SHA for cd7713b
src/target.cpp
@@ -433,7 +433,22 @@ static int get_arch_pointer_bit_width(ZigLLVM_ArchType arch) {
433
int get_c_type_size_in_bits(const ZigTarget *target, CIntType id) {
434
switch (target->os) {
435
case ZigLLVM_UnknownOS:
436
- zig_unreachable();
+ switch (id) {
437
+ case CIntTypeShort:
438
+ case CIntTypeUShort:
439
+ return 16;
440
+ case CIntTypeInt:
441
+ case CIntTypeUInt:
442
+ return 32;
443
+ case CIntTypeLong:
444
+ case CIntTypeULong:
445
+ return get_arch_pointer_bit_width(target->arch.arch);
446
+ case CIntTypeLongLong:
447
+ case CIntTypeULongLong:
448
+ return 64;
449
+ case CIntTypeCount:
450
+ zig_unreachable();
451
+ }
452
case ZigLLVM_Linux:
453
case ZigLLVM_Darwin:
454
switch (id) {
0 commit comments