aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2016-02-13 16:29:30 -0700
committerAndrew Kelley <superjoe30@gmail.com>2016-02-13 16:29:30 -0700
commitfe95a227c8d7a61618712df6920fa52de2533c8c (patch)
treed9f9e071c4b1a0f4bed82b0916aaa26879274ae0 /src
parent03b51a753a9cdddc362ace7266534ddf1f6d40c7 (diff)
downloadzig-fe95a227c8d7a61618712df6920fa52de2533c8c.tar.gz
zig-fe95a227c8d7a61618712df6920fa52de2533c8c.zip
add windows C int sizes
Diffstat (limited to 'src')
-rw-r--r--src/target.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/target.cpp b/src/target.cpp
index cb8fc2506c..e8079c05e2 100644
--- a/src/target.cpp
+++ b/src/target.cpp
@@ -370,6 +370,22 @@ int get_c_type_size_in_bits(const ZigTarget *target, CIntType id) {
case CIntTypeCount:
zig_unreachable();
}
+ case ZigLLVM_Win32:
+ switch (id) {
+ case CIntTypeShort:
+ case CIntTypeUShort:
+ return 16;
+ case CIntTypeInt:
+ case CIntTypeUInt:
+ case CIntTypeLong:
+ case CIntTypeULong:
+ return 32;
+ case CIntTypeLongLong:
+ case CIntTypeULongLong:
+ return 64;
+ case CIntTypeCount:
+ zig_unreachable();
+ }
case ZigLLVM_CloudABI:
case ZigLLVM_Darwin:
case ZigLLVM_DragonFly:
@@ -381,7 +397,6 @@ int get_c_type_size_in_bits(const ZigTarget *target, CIntType id) {
case ZigLLVM_NetBSD:
case ZigLLVM_OpenBSD:
case ZigLLVM_Solaris:
- case ZigLLVM_Win32:
case ZigLLVM_Haiku:
case ZigLLVM_Minix:
case ZigLLVM_RTEMS: