Kazu Hirata d82617d2e8
[ADT] Refactor SmallPtrSetImplBase::swap (NFC) (#154261)
SmallPtrSetImplBase::swap needs to deal with four cases depending on
whether LHS is small and whether RHS is small.  Now, the code to swap
small LHS and large RHS is symmetric with the code to swap large LHS
and small RHS.

This patch rearranges code so that we first take care of the case
where both LHS and RHS are small.  Then we compute references
SmallSide and LargeSide and actually swap the two instances.

This refactoing saves about 11 lines of code.  Note that
SmallDenseMap::swap also uses a similar trick.
2025-08-18 22:39:38 -07:00
..

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.