[PATCH] D77621: Change BitcodeWriter buffer to std::vector instead of SmallVector.

Duncan P. N. Exon Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 23 21:42:34 PDT 2020


dexonsmith added a comment.

In D77621#2000237 <https://reviews.llvm.org/D77621#2000237>, @nikic wrote:

> Okay, I'm basically fine with that, if it is our stance that SmallVector should always be preferred over std::vector. Not really related to this revision, but it would probably help to do some renaming/aliasing to facilitate that view. Right now, the number of `SmallVector<T, 0>` uses in LLVM is really small compared to the `std::vector<T>` uses (100 vs 6000 based on a not very accurate grep). I think part of that is in the name, and calling it `using Vector<T> = SmallVector<T, 0>` and `using VectorImpl<T> = SmallVectorImpl<T>` would make it a lot more obvious that this is our preferred general purpose vector type, even if the stored data is not small.


Those aliases SGTM.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77621/new/

https://reviews.llvm.org/D77621





More information about the cfe-commits mailing list