Use ArrayRef instead of a reference to a SmallVectorImpl.