Use ArrayRef instead of SmallVector when passing vector into function.