Skip to content

Commit

Permalink
src/atomic.cr
Browse files Browse the repository at this point in the history
Fix: detect LLVM version
  • Loading branch information
ysbaddaden committed Feb 12, 2024
1 parent c74327a commit 5a170f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/atomic.cr
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ struct Atomic(T)
end

def compare_and_set(cmp : T, new : T, success_ordering : Ordering, failure_ordering : Ordering) : {T, Bool}
{% if compare_versions(Crystal::LLVM_VERSION, "1.13.0") >= 0 %}
{% if compare_versions(Crystal::LLVM_VERSION, "13.0.0") >= 0 %}
# LLVM since 13.0.0 accepts any combination of success & failure ordering
case success_ordering
{% for s_ordering in Ordering.constants %}
Expand Down

0 comments on commit 5a170f5

Please sign in to comment.