aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-09-13 00:17:19 -0400
committerAndrew Kelley <superjoe30@gmail.com>2017-09-13 02:40:02 -0400
commit57ea6e8c9f204be6d38177024d3b8f1aba4e05b2 (patch)
tree0a9897aab096767288688216aa68d3809e2d77fe /src/codegen.cpp
parent67021e2bfff0b9caea432fd996031ab880afdbc5 (diff)
downloadzig-57ea6e8c9f204be6d38177024d3b8f1aba4e05b2.tar.gz
zig-57ea6e8c9f204be6d38177024d3b8f1aba4e05b2.zip
fix up msvc stuff to make it work on linux and macos too
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 5a273375f5..3d34eaacbf 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -5194,8 +5194,7 @@ void codegen_add_object(CodeGen *g, Buf *object_path) {
g->link_objects.append(object_path);
}
-#if defined(_MSVC)
-// MSVC doesn't seem to support "designators" for array initialization
+// Must be coordinated with with CIntType enum
static const char *c_int_type_names[] = {
"short",
"unsigned short",
@@ -5206,18 +5205,6 @@ static const char *c_int_type_names[] = {
"long long",
"unsigned long long",
};
-#else
-static const char *c_int_type_names[] = {
- [CIntTypeShort] = "short",
- [CIntTypeUShort] = "unsigned short",
- [CIntTypeInt] = "int",
- [CIntTypeUInt] = "unsigned int",
- [CIntTypeLong] = "long",
- [CIntTypeULong] = "unsigned long",
- [CIntTypeLongLong] = "long long",
- [CIntTypeULongLong] = "unsigned long long",
-};
-#endif
static void get_c_type(CodeGen *g, TypeTableEntry *type_entry, Buf *out_buf) {
assert(type_entry);