Skip to content

Commit

Permalink
Check for LLVM_VERSION_MAJOR >= 18
Browse files Browse the repository at this point in the history
  • Loading branch information
gingerBill committed Sep 9, 2024
1 parent 0dddd2b commit a25a9e6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/llvm_backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit a25a9e6

Please sign in to comment.