mirror of
https://github.com/odin-lang/Odin.git
synced 2026-01-10 15:03:22 +00:00
Merge branch 'master' into windows-llvm-11.1.0
This commit is contained in:
@@ -23,7 +23,7 @@ _mkdir_all :: proc(path: string, perm: File_Mode) -> Error {
|
||||
fix_root_directory :: proc(p: string) -> (s: string, allocated: bool, err: runtime.Allocator_Error) {
|
||||
if len(p) == len(`\\?\c:`) {
|
||||
if is_path_separator(p[0]) && is_path_separator(p[1]) && p[2] == '?' && is_path_separator(p[3]) && p[5] == ':' {
|
||||
s = strings.concatenate_safe({p, `\`}, _file_allocator()) or_return
|
||||
s = strings.concatenate({p, `\`}, _file_allocator()) or_return
|
||||
allocated = true
|
||||
return
|
||||
}
|
||||
|
||||
@@ -785,12 +785,10 @@ gb_internal lbValue lb_generate_anonymous_proc_lit(lbModule *m, String const &pr
|
||||
|
||||
// NOTE(bill): Generate a new name
|
||||
// parent$count
|
||||
isize name_len = prefix_name.len + 1 + 8 + 1;
|
||||
isize name_len = prefix_name.len + 6 + 11;
|
||||
char *name_text = gb_alloc_array(permanent_allocator(), char, name_len);
|
||||
static std::atomic<i32> name_id;
|
||||
name_id.fetch_add(1);
|
||||
|
||||
name_len = gb_snprintf(name_text, name_len, "%.*s$anon-%d", LIT(prefix_name), name_id.load());
|
||||
name_len = gb_snprintf(name_text, name_len, "%.*s$anon-%d", LIT(prefix_name), name_id.fetch_add(1));
|
||||
String name = make_string((u8 *)name_text, name_len-1);
|
||||
|
||||
Type *type = type_of_expr(expr);
|
||||
|
||||
Reference in New Issue
Block a user