mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-07 14:24:43 +00:00
publicize member functions affected by #4909
This commit is contained in:
parent
4a5c58dd35
commit
b6dc7fc9ff
6 changed files with 14 additions and 14 deletions
|
|
@ -284,11 +284,11 @@ pub const Builder = struct {
|
||||||
return run_step;
|
return run_step;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn dupe(self: *Builder, bytes: []const u8) []u8 {
|
pub fn dupe(self: *Builder, bytes: []const u8) []u8 {
|
||||||
return mem.dupe(self.allocator, u8, bytes) catch unreachable;
|
return mem.dupe(self.allocator, u8, bytes) catch unreachable;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn dupePath(self: *Builder, bytes: []const u8) []u8 {
|
pub fn dupePath(self: *Builder, bytes: []const u8) []u8 {
|
||||||
const the_copy = self.dupe(bytes);
|
const the_copy = self.dupe(bytes);
|
||||||
for (the_copy) |*byte| {
|
for (the_copy) |*byte| {
|
||||||
switch (byte.*) {
|
switch (byte.*) {
|
||||||
|
|
@ -717,7 +717,7 @@ pub const Builder = struct {
|
||||||
return self.invalid_user_input;
|
return self.invalid_user_input;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn spawnChild(self: *Builder, argv: []const []const u8) !void {
|
pub fn spawnChild(self: *Builder, argv: []const []const u8) !void {
|
||||||
return self.spawnChildEnvMap(null, self.env_map, argv);
|
return self.spawnChildEnvMap(null, self.env_map, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -843,7 +843,7 @@ pub const Builder = struct {
|
||||||
}) catch unreachable;
|
}) catch unreachable;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn updateFile(self: *Builder, source_path: []const u8, dest_path: []const u8) !void {
|
pub fn updateFile(self: *Builder, source_path: []const u8, dest_path: []const u8) !void {
|
||||||
if (self.verbose) {
|
if (self.verbose) {
|
||||||
warn("cp {} {} ", .{ source_path, dest_path });
|
warn("cp {} {} ", .{ source_path, dest_path });
|
||||||
}
|
}
|
||||||
|
|
@ -855,7 +855,7 @@ pub const Builder = struct {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
fn pathFromRoot(self: *Builder, rel_path: []const u8) []u8 {
|
pub fn pathFromRoot(self: *Builder, rel_path: []const u8) []u8 {
|
||||||
return fs.path.resolve(self.allocator, &[_][]const u8{ self.build_root, rel_path }) catch unreachable;
|
return fs.path.resolve(self.allocator, &[_][]const u8{ self.build_root, rel_path }) catch unreachable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ const Die = struct {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
fn getAttrString(self: *const Die, di: *DwarfInfo, id: u64) ![]const u8 {
|
pub fn getAttrString(self: *const Die, di: *DwarfInfo, id: u64) ![]const u8 {
|
||||||
const form_value = self.getAttr(id) orelse return error.MissingDebugInfo;
|
const form_value = self.getAttr(id) orelse return error.MissingDebugInfo;
|
||||||
return switch (form_value.*) {
|
return switch (form_value.*) {
|
||||||
FormValue.String => |value| value,
|
FormValue.String => |value| value,
|
||||||
|
|
@ -389,7 +389,7 @@ pub const DwarfInfo = struct {
|
||||||
return self.abbrev_table_list.allocator;
|
return self.abbrev_table_list.allocator;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn getSymbolName(di: *DwarfInfo, address: u64) ?[]const u8 {
|
pub fn getSymbolName(di: *DwarfInfo, address: u64) ?[]const u8 {
|
||||||
for (di.func_list.span()) |*func| {
|
for (di.func_list.span()) |*func| {
|
||||||
if (func.pc_range) |range| {
|
if (func.pc_range) |range| {
|
||||||
if (address >= range.start and address < range.end) {
|
if (address >= range.start and address < range.end) {
|
||||||
|
|
@ -578,7 +578,7 @@ pub const DwarfInfo = struct {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn findCompileUnit(di: *DwarfInfo, target_address: u64) !*const CompileUnit {
|
pub fn findCompileUnit(di: *DwarfInfo, target_address: u64) !*const CompileUnit {
|
||||||
for (di.compile_unit_list.span()) |*compile_unit| {
|
for (di.compile_unit_list.span()) |*compile_unit| {
|
||||||
if (compile_unit.pc_range) |range| {
|
if (compile_unit.pc_range) |range| {
|
||||||
if (target_address >= range.start and target_address < range.end) return compile_unit;
|
if (target_address >= range.start and target_address < range.end) return compile_unit;
|
||||||
|
|
@ -690,7 +690,7 @@ pub const DwarfInfo = struct {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn getLineNumberInfo(di: *DwarfInfo, compile_unit: CompileUnit, target_address: usize) !debug.LineInfo {
|
pub fn getLineNumberInfo(di: *DwarfInfo, compile_unit: CompileUnit, target_address: usize) !debug.LineInfo {
|
||||||
var stream = io.fixedBufferStream(di.debug_line);
|
var stream = io.fixedBufferStream(di.debug_line);
|
||||||
const in = &stream.inStream();
|
const in = &stream.inStream();
|
||||||
const seekable = &stream.seekableStream();
|
const seekable = &stream.seekableStream();
|
||||||
|
|
|
||||||
|
|
@ -33,11 +33,11 @@ const LinkMap = extern struct {
|
||||||
pub const Iterator = struct {
|
pub const Iterator = struct {
|
||||||
current: ?*LinkMap,
|
current: ?*LinkMap,
|
||||||
|
|
||||||
fn end(self: *Iterator) bool {
|
pub fn end(self: *Iterator) bool {
|
||||||
return self.current == null;
|
return self.current == null;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn next(self: *Iterator) ?*LinkMap {
|
pub fn next(self: *Iterator) ?*LinkMap {
|
||||||
if (self.current) |it| {
|
if (self.current) |it| {
|
||||||
self.current = it.l_next;
|
self.current = it.l_next;
|
||||||
return it;
|
return it;
|
||||||
|
|
|
||||||
|
|
@ -2336,7 +2336,7 @@ pub const StringifyOptions = struct {
|
||||||
/// After a colon, should whitespace be inserted?
|
/// After a colon, should whitespace be inserted?
|
||||||
separator: bool = true,
|
separator: bool = true,
|
||||||
|
|
||||||
fn outputIndent(
|
pub fn outputIndent(
|
||||||
whitespace: @This(),
|
whitespace: @This(),
|
||||||
out_stream: var,
|
out_stream: var,
|
||||||
) @TypeOf(out_stream).Error!void {
|
) @TypeOf(out_stream).Error!void {
|
||||||
|
|
|
||||||
|
|
@ -708,7 +708,7 @@ const MsfStream = struct {
|
||||||
return block * self.block_size + offset;
|
return block * self.block_size + offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn inStream(self: *MsfStream) std.io.InStream(*MsfStream, Error, read) {
|
pub fn inStream(self: *MsfStream) std.io.InStream(*MsfStream, Error, read) {
|
||||||
return .{ .context = self };
|
return .{ .context = self };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -660,7 +660,7 @@ pub const CrossTarget = struct {
|
||||||
return Target.getObjectFormatSimple(self.getOsTag(), self.getCpuArch());
|
return Target.getObjectFormatSimple(self.getOsTag(), self.getCpuArch());
|
||||||
}
|
}
|
||||||
|
|
||||||
fn updateCpuFeatures(self: CrossTarget, set: *Target.Cpu.Feature.Set) void {
|
pub fn updateCpuFeatures(self: CrossTarget, set: *Target.Cpu.Feature.Set) void {
|
||||||
set.removeFeatureSet(self.cpu_features_sub);
|
set.removeFeatureSet(self.cpu_features_sub);
|
||||||
set.addFeatureSet(self.cpu_features_add);
|
set.addFeatureSet(self.cpu_features_add);
|
||||||
set.populateDependencies(self.getCpuArch().allFeaturesList());
|
set.populateDependencies(self.getCpuArch().allFeaturesList());
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue