Add a trivial ArrayRef helper overload to the SelectionDAG interface.

I'm using this pretty frequently in a patch I'm working on and it seems
generally useful.

llvm-svn: 209872
This commit is contained in:
Chandler Carruth 2014-05-30 03:50:06 +00:00
parent c0f9121e71
commit 6cd3ebb223
1 changed files with 6 additions and 0 deletions

View File

@ -540,6 +540,12 @@ public:
/// undefined.
SDValue getVectorShuffle(EVT VT, SDLoc dl, SDValue N1, SDValue N2,
const int *MaskElts);
SDValue getVectorShuffle(EVT VT, SDLoc dl, SDValue N1, SDValue N2,
ArrayRef<int> MaskElts) {
assert(VT.getVectorNumElements() == MaskElts.size() &&
"Must have the same number of vector elements as mask elements!");
return getVectorShuffle(VT, dl, N1, N2, MaskElts.data());
}
/// getAnyExtOrTrunc - Convert Op, which must be of integer type, to the
/// integer type VT, by either any-extending or truncating it.