aboutsummaryrefslogtreecommitdiff
path: root/src/codegen
diff options
context:
space:
mode:
Diffstat (limited to 'src/codegen')
-rw-r--r--src/codegen/llvm.zig4
-rw-r--r--src/codegen/llvm/bindings.zig2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig
index 6bf7476a4e..00ce2ca226 100644
--- a/src/codegen/llvm.zig
+++ b/src/codegen/llvm.zig
@@ -1325,7 +1325,7 @@ pub const Object = struct {
},
};
if (options.asm_path != null and options.bin_path != null) {
- if (target_machine.emitToFile(module, &error_message, lowered_options)) {
+ if (target_machine.emitToFile(module, &error_message, &lowered_options)) {
defer llvm.disposeMessage(error_message);
log.err("LLVM failed to emit bin={s} ir={s}: {s}", .{
emit_bin_msg, post_llvm_ir_msg, error_message,
@@ -1337,7 +1337,7 @@ pub const Object = struct {
}
lowered_options.asm_filename = options.asm_path;
- if (target_machine.emitToFile(module, &error_message, lowered_options)) {
+ if (target_machine.emitToFile(module, &error_message, &lowered_options)) {
defer llvm.disposeMessage(error_message);
log.err("LLVM failed to emit asm={s} bin={s} ir={s} bc={s}: {s}", .{
emit_asm_msg, emit_bin_msg, post_llvm_ir_msg, post_llvm_bc_msg,
diff --git a/src/codegen/llvm/bindings.zig b/src/codegen/llvm/bindings.zig
index ebab18f68a..bb294f27d9 100644
--- a/src/codegen/llvm/bindings.zig
+++ b/src/codegen/llvm/bindings.zig
@@ -130,7 +130,7 @@ pub const TargetMachine = opaque {
T: *TargetMachine,
M: *Module,
ErrorMessage: *[*:0]const u8,
- options: EmitOptions,
+ options: *const EmitOptions,
) bool;
pub const createTargetDataLayout = LLVMCreateTargetDataLayout;