aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-09-09 14:47:44 +0100
committergingerBill <bill@gingerbill.org>2024-09-09 14:47:44 +0100
commita25a9e6ebe58510cfac20e1187f41a01ec3ec2b2 (patch)
tree1c382a9fd2fb419084641601e4ea1b2b012e047d
parent0dddd2b97e4ad526fa5e33d270301c1b807e520e (diff)
Check for `LLVM_VERSION_MAJOR >= 18`
-rw-r--r--src/llvm_backend.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp
index 19b5ced67..01ded321e 100644
--- a/src/llvm_backend.cpp
+++ b/src/llvm_backend.cpp
@@ -3082,9 +3082,11 @@ gb_internal bool lb_generate_code(lbGenerator *gen) {
m->target_machine = target_machine;
LLVMSetModuleDataLayout(m->mod, LLVMCreateTargetDataLayout(target_machine));
+ #if LLVM_VERSION_MAJOR >= 18
if (build_context.fast_isel) {
LLVMSetTargetMachineFastISel(m->target_machine, true);
}
+ #endif
array_add(&target_machines, target_machine);
}