| ... | ... | @@ -18187,17 +18187,18 @@ static ZigType *ir_analyze_instruction_embed_file(IrAnalyze *ira, IrInstructionE |
| 18187 | 18187 | &source_dir_path, |
| 18188 | 18188 | rel_file_path, |
| 18189 | 18189 | }; |
| 18190 | | Buf file_path = os_path_resolve(resolve_paths, 2); |
| 18190 | Buf *file_path = buf_alloc(); |
| 18191 | *file_path = os_path_resolve(resolve_paths, 2); |
| 18191 | 18192 | |
| 18192 | 18193 | // load from file system into const expr |
| 18193 | 18194 | Buf *file_contents = buf_alloc(); |
| 18194 | 18195 | int err; |
| 18195 | | if ((err = file_fetch(ira->codegen, &file_path, file_contents))) { |
| 18196 | if ((err = file_fetch(ira->codegen, file_path, file_contents))) { |
| 18196 | 18197 | if (err == ErrorFileNotFound) { |
| 18197 | | ir_add_error(ira, instruction->name, buf_sprintf("unable to find '%s'", buf_ptr(&file_path))); |
| 18198 | ir_add_error(ira, instruction->name, buf_sprintf("unable to find '%s'", buf_ptr(file_path))); |
| 18198 | 18199 | return ira->codegen->builtin_types.entry_invalid; |
| 18199 | 18200 | } else { |
| 18200 | | ir_add_error(ira, instruction->name, buf_sprintf("unable to open '%s': %s", buf_ptr(&file_path), err_str(err))); |
| 18201 | ir_add_error(ira, instruction->name, buf_sprintf("unable to open '%s': %s", buf_ptr(file_path), err_str(err))); |
| 18201 | 18202 | return ira->codegen->builtin_types.entry_invalid; |
| 18202 | 18203 | } |
| 18203 | 18204 | } |