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 | c48e1ef0e22b4113dd4dd48c5b170a19fe4d0188 (patch) | |
tree | d2d09f22276ce006558874614ce7134d78db68b8 /lib/AsmParser | |
parent | b8c129ea66847d68adef845f5745819b18685970 (diff) | |
download | external_llvm-c48e1ef0e22b4113dd4dd48c5b170a19fe4d0188.zip external_llvm-c48e1ef0e22b4113dd4dd48c5b170a19fe4d0188.tar.gz external_llvm-c48e1ef0e22b4113dd4dd48c5b170a19fe4d0188.tar.bz2 |
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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135389 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser')
0 files changed, 0 insertions, 0 deletions