Merged from upstream, fixed 'args' name colission
This commit is contained in:
1 parent
c0019cc305
commit
6b33b254e9
4 files changed
+206
-2
No files matched your search
+3
-1
@@ -276,7 +276,9 @@ extern "C" {
|
||||
|
||||
// TODO(bill): How many of these headers do I really need?
|
||||
// #include <stdarg.h>
|
||||
// #include <stddef.h>
|
||||
#if !defined(GB_SYSTEM_WINDOWS)
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6792,6 +6792,12 @@ void ir_gen_tree(irGen *s) {
|
||||
} else if (e->kind == Entity_Procedure && e->Procedure.link_name.len > 0) {
|
||||
// Handle later
|
||||
} else if (scope->is_init && e->kind == Entity_Procedure && str_eq(name, str_lit("main"))) {
|
||||
#ifdef GB_SYSTEM_OSX
|
||||
} else if (str_eq(name, str_lit("args")) && str_eq(e->token.pos.file, get_fullpath_core(heap_allocator(), str_lit("os_x.odin")))) {
|
||||
#endif
|
||||
#ifdef GB_SYSTEM_LINUX
|
||||
} else if (str_eq(name, str_lit("args")) && str_eq(e->token.pos.file, get_fullpath_core(heap_allocator(), str_lit("os_linux.odin")))) {
|
||||
#endif
|
||||
} else {
|
||||
name = ir_mangle_name(s, e->token.pos.file, e);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user