The Senate has passed legislation that will allow the referendum on an Indigenous Voice to Parliament to be held.