diff --git a/llvm/lib/DWARFLinker/Parallel/ArrayList.h b/llvm/lib/DWARFLinker/Parallel/ArrayList.h index c48f828609be2..d99fdcc8c60c0 100644 --- a/llvm/lib/DWARFLinker/Parallel/ArrayList.h +++ b/llvm/lib/DWARFLinker/Parallel/ArrayList.h @@ -137,7 +137,7 @@ template class ArrayList { NewGroup->Next = nullptr; // Try to replace current group with allocated one. - if (AtomicGroup.compare_exchange_weak(CurGroup, NewGroup)) + if (AtomicGroup.compare_exchange_strong(CurGroup, NewGroup)) return true; // Put allocated group as last group.