[Triple] Add a helper to switch between big/little endian variants