This is intended to address a compile-time regression from rG1eddce4177cfddc86d4696b758904443b0b4f193. A SmallPtrSet was replaced with a SetVector there, which had an unexpected large compile-time impact. It turns out that this structure is getting swapped a lot, and previously this used an optimized std::swap specialization for SmallPtrSet. Now it ends up using the default, triple-move based implementation, which is much more expensive.
This patch addresses the issue by specializing std::swap() for SetVector. I'll provide more specific compile-time numbers once I have them.
Something that I'm really stumped about: I initially used std::swap() here instead of the swap() member functions. However, for some reason that ends up picking up an optimized swap implementation for vector_, but not for set_ (which is the more important one really).