mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
zcu: fixup incorrect pass-by-value of Zcu
This commit is contained in:
parent
d8c1c9ea6e
commit
11534aa34d
2 changed files with 3 additions and 8 deletions
|
|
@ -508,11 +508,6 @@ pub const Block = struct {
|
|||
}
|
||||
};
|
||||
|
||||
/// For debugging purposes.
|
||||
pub fn dump(block: *Block, mod: Module) void {
|
||||
Zir.dumpBlock(mod, block);
|
||||
}
|
||||
|
||||
pub fn makeSubBlock(parent: *Block) Block {
|
||||
return .{
|
||||
.parent = parent,
|
||||
|
|
|
|||
|
|
@ -3127,14 +3127,14 @@ pub fn errNote(
|
|||
/// Deprecated. There is no global target for a Zig Compilation Unit. Instead,
|
||||
/// look up the target based on the Module that contains the source code being
|
||||
/// analyzed.
|
||||
pub fn getTarget(zcu: Module) Target {
|
||||
pub fn getTarget(zcu: *const Zcu) Target {
|
||||
return zcu.root_mod.resolved_target.result;
|
||||
}
|
||||
|
||||
/// Deprecated. There is no global optimization mode for a Zig Compilation
|
||||
/// Unit. Instead, look up the optimization mode based on the Module that
|
||||
/// contains the source code being analyzed.
|
||||
pub fn optimizeMode(zcu: Module) std.builtin.OptimizeMode {
|
||||
pub fn optimizeMode(zcu: *const Zcu) std.builtin.OptimizeMode {
|
||||
return zcu.root_mod.optimize_mode;
|
||||
}
|
||||
|
||||
|
|
@ -3203,7 +3203,7 @@ pub const Feature = enum {
|
|||
separate_thread,
|
||||
};
|
||||
|
||||
pub fn backendSupportsFeature(zcu: Module, comptime feature: Feature) bool {
|
||||
pub fn backendSupportsFeature(zcu: *const Zcu, comptime feature: Feature) bool {
|
||||
const backend = target_util.zigBackend(zcu.root_mod.resolved_target.result, zcu.comp.config.use_llvm);
|
||||
return target_util.backendSupportsFeature(backend, feature);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue