fix up msvc stuff to make it work on linux and macos too
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user