Use SmallVectorImpl& for function arguments instead of SmallVector.