@@ -13224,9 +13224,9 @@ static TypeTableEntry *ir_analyze_instruction_embed_file(IrAnalyze *ira, IrInstr
1322413224 os_path_resolve(&source_dir_path, rel_file_path, &file_path);
1322513225
1322613226 // load from file system into const expr
13227- Buf file_contents = BUF_INIT ;
13227+ Buf * file_contents = buf_alloc() ;
1322813228 int err;
13229- if ((err = os_fetch_file_path(&file_path, & file_contents))) {
13229+ if ((err = os_fetch_file_path(&file_path, file_contents))) {
1323013230 if (err == ErrorFileNotFound) {
1323113231 ir_add_error(ira, instruction->name, buf_sprintf("unable to find '%s'", buf_ptr(&file_path)));
1323213232 return ira->codegen->builtin_types.entry_invalid;
@@ -13240,9 +13240,9 @@ static TypeTableEntry *ir_analyze_instruction_embed_file(IrAnalyze *ira, IrInstr
1324013240 // we'll have to invalidate the cache
1324113241
1324213242 ConstExprValue *out_val = ir_build_const_from(ira, &instruction->base);
13243- init_const_str_lit(ira->codegen, out_val, & file_contents);
13243+ init_const_str_lit(ira->codegen, out_val, file_contents);
1324413244
13245- return get_array_type(ira->codegen, ira->codegen->builtin_types.entry_u8, buf_len(& file_contents));
13245+ return get_array_type(ira->codegen, ira->codegen->builtin_types.entry_u8, buf_len(file_contents));
1324613246}
1324713247
1324813248static TypeTableEntry *ir_analyze_instruction_cmpxchg(IrAnalyze *ira, IrInstructionCmpxchg *instruction) {
0 commit comments