mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-28 18:30:06 +00:00
Merged from upstream, fixed 'args' name colission
This commit is contained in:
+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