union DebugLocation [src]
Fields
no_location: void
location: Location
Members
- Location (struct)
- toMetadata (Function)
Source
pub const DebugLocation = union(enum) {
no_location: void,
location: Location,
pub const Location = struct {
line: u32,
column: u32,
scope: Builder.Metadata,
inlined_at: Builder.Metadata,
};
pub fn toMetadata(self: DebugLocation, builder: *Builder) Allocator.Error!Metadata {
return switch (self) {
.no_location => .none,
.location => |location| try builder.debugLocation(
location.line,
location.column,
location.scope,
location.inlined_at,
),
};
}
}