[llvm] r200688 - Introduce SmallPtrSetImpl<T *> which allows insert, erase, count, and

Nico Rieck nico.rieck at gmail.com
Wed Feb 5 09:26:43 PST 2014


With the hierarchy looking like this:

SmallVector<T, N>
SmallVectorImpl<T>
SmallVectorTemplateBase<T, IsPod>
SmallVectorTemplateCommon<T>
SmallVectorBase

The latter three should never be used anywhere else so the Base-suffix
could be freed by renaming SmallVectorBase. But Base isn't such a great
suffix on "public" API, though better than Impl.

Looking at the first two, SmallVector is called Small because it's
efficient for sizes <= N. This information is lost with SmallVectorImpl,
and it looks just like a normal vector (and with a few modifications
could also be used standalone).

So, what about just calling it Vector<T>? It might be too crazy, but
it's short, without irrelevant suffix, and says what it does. But then
it's still an abstract class...

If Small- should be part of the name using SmallVector for both seems to
be the most aesthetically pleasing to me: specify N to get internal
storage, or leave out N to get unspecified internal storage.

-Nico



More information about the llvm-commits mailing list