diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-04-09 00:50:58 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-09 00:50:58 -0700 |
| commit | ac21ade667f0f42b8b1aec5831cbc99cbaed8565 (patch) | |
| tree | f66d847662b81eefe8c30de88dfedb0d93cdc524 /src/Compilation.zig | |
| parent | d979df585d05de8d7385495fe6aee2b1d4e1380f (diff) | |
| parent | bc0e2089bc9408fa76716652a8ede5b5b44a817a (diff) | |
| download | zig-ac21ade667f0f42b8b1aec5831cbc99cbaed8565.tar.gz zig-ac21ade667f0f42b8b1aec5831cbc99cbaed8565.zip | |
Merge pull request #19572 from jacobly0/haiku-bootstrap
haiku: get cmake bootstrap working
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index c533f2fae7..5395be9f32 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -3159,7 +3159,7 @@ pub fn addModuleErrorMsg(mod: *Module, eb: *ErrorBundle.Wip, module_err_msg: Mod const rt_file_path = try module_reference.src_loc.file_scope.fullPath(gpa); defer gpa.free(rt_file_path); ref_traces.appendAssumeCapacity(.{ - .decl_name = try eb.addString(ip.stringToSlice(module_reference.decl)), + .decl_name = try eb.addString(module_reference.decl.toSlice(ip)), .src_loc = try eb.addSourceLocation(.{ .src_path = try eb.addString(rt_file_path), .span_start = span.start, @@ -4074,8 +4074,7 @@ fn workerCheckEmbedFile( fn detectEmbedFileUpdate(comp: *Compilation, embed_file: *Module.EmbedFile) !void { const mod = comp.module.?; const ip = &mod.intern_pool; - const sub_file_path = ip.stringToSlice(embed_file.sub_file_path); - var file = try embed_file.owner.root.openFile(sub_file_path, .{}); + var file = try embed_file.owner.root.openFile(embed_file.sub_file_path.toSlice(ip), .{}); defer file.close(); const stat = try file.stat(); @@ -4444,7 +4443,7 @@ fn reportRetryableEmbedFileError( const ip = &mod.intern_pool; const err_msg = try Module.ErrorMsg.create(gpa, src_loc, "unable to load '{}{s}': {s}", .{ embed_file.owner.root, - ip.stringToSlice(embed_file.sub_file_path), + embed_file.sub_file_path.toSlice(ip), @errorName(err), }); |
