mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 21:08:36 +00:00
LLVM: Move pt field from Object to NavGen
* LLVM: Pass correct tid to emit * Store stack trace type in Zcu * Don't use pt.errorIntType in LLVM backend
This commit is contained in:
parent
e7b18a7ce6
commit
e3b79d65d8
@ -3042,7 +3042,7 @@ fn flush(
|
||||
// If there's an output file, it wants to decide where the LLVM object goes!
|
||||
const sub_prog_node = comp.link_prog_node.start("LLVM Emit Object", 0);
|
||||
defer sub_prog_node.end();
|
||||
try llvm_object.emit(.{
|
||||
try llvm_object.emit(.{ .zcu = zcu, .tid = tid }, .{
|
||||
.pre_ir_path = comp.verbose_llvm_ir,
|
||||
.pre_bc_path = comp.verbose_llvm_bc,
|
||||
|
||||
|
||||
@ -9916,6 +9916,8 @@ fn finishFunc(
|
||||
// lower this fn type.
|
||||
const unresolved_stack_trace_ty = try sema.getBuiltinType(block.nodeOffset(.zero), .StackTrace);
|
||||
try unresolved_stack_trace_ty.resolveFields(pt);
|
||||
|
||||
if (zcu.stack_trace_type == .none) zcu.stack_trace_type = unresolved_stack_trace_ty.toIntern();
|
||||
}
|
||||
|
||||
return Air.internedToRef(if (opt_func_index != .none) opt_func_index else func_ty);
|
||||
|
||||
@ -308,6 +308,7 @@ free_type_references: std.ArrayListUnmanaged(u32) = .empty,
|
||||
|
||||
/// Populated by analysis of `AnalUnit.wrap(.{ .memoized_state = s })`, where `s` depends on the element.
|
||||
builtin_decl_values: BuiltinDecl.Memoized = .initFill(.none),
|
||||
stack_trace_type: InternPool.Index = .none,
|
||||
|
||||
incremental_debug_state: if (build_options.enable_debug_extensions) IncrementalDebugState else void =
|
||||
if (build_options.enable_debug_extensions) .init else {},
|
||||
|
||||
1243
src/codegen/llvm.zig
1243
src/codegen/llvm.zig
File diff suppressed because it is too large
Load Diff
@ -3807,10 +3807,11 @@ pub fn flush(
|
||||
tid: Zcu.PerThread.Id,
|
||||
prog_node: std.Progress.Node,
|
||||
) link.File.FlushError!void {
|
||||
_ = tid;
|
||||
|
||||
// The goal is to never use this because it's only needed if we need to
|
||||
// write to InternPool, but flush is too late to be writing to the
|
||||
// InternPool.
|
||||
_ = tid;
|
||||
const comp = wasm.base.comp;
|
||||
const diags = &comp.link_diags;
|
||||
const gpa = comp.gpa;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user