diff options
author | Frits van Bommel <fvbommel@gmail.com> | 2011-07-18 11:58:53 +0000 |
---|---|---|
committer | Frits van Bommel <fvbommel@gmail.com> | 2011-07-18 11:58:53 +0000 |
commit | 23db45e99c833273144cf2d86e678887944afe6b (patch) | |
tree | 92ca81a139fefcd4b960fd3fa500a323eeb7e9a4 /llvm/lib/Transforms | |
parent | a185c78d4d022274882ae26c6a4c4badf048fac9 (diff) | |
download | bcm5719-llvm-23db45e99c833273144cf2d86e678887944afe6b.tar.gz bcm5719-llvm-23db45e99c833273144cf2d86e678887944afe6b.zip |
Introduce the 'makeArrayRef(...)' family of functions, which fills a similar role for ArrayRef<> as std::make_pair() fills for std::pair<>: they return the right instantiation of ArrayRef<T> based on the types of the parameters.
They mostly mirror the ArrayRef constructors, with two exceptions:
* There's no function mirroring the default constructor because it wouldn't have any parameters to deduce the right ArrayRef<T> from.
* There's an explicit SmallVector<T> overload in addition to the SmallVectorImpl<T> overload. Without it, the single-element overload would try to create an ArrayRef<Smallvector<T> > because it's a better match according to the overloading rules. (And both overloads are used in the current tree, so neither is redundant)
llvm-svn: 135389
Diffstat (limited to 'llvm/lib/Transforms')
0 files changed, 0 insertions, 0 deletions