diff --git a/include/llvm/ADT/PriorityQueue.h b/include/llvm/ADT/PriorityQueue.h index 1cff0f2a0ce..2503f75e81a 100644 --- a/include/llvm/ADT/PriorityQueue.h +++ b/include/llvm/ADT/PriorityQueue.h @@ -51,7 +51,7 @@ public: // Logarithmic-time heap bubble-up. while (i != 0) { typename Sequence::size_type parent = (i - 1) / 2; - std::swap(this->c[i], this->c[parent]); + this->c[i] = this->c[parent]; i = parent; }