Uhh, that's why you switch him out if you think you're going to be hit by an ice attack...
Besides, you don't switch Salamence into an ice attacker, you switch him into something he resists, then Dragon Dance while they are switching. Hopefully you'll be fast enough to outspeed them, but if you see a Weavile or Mamoswine, they probably have ice shard so you'll probably have to switch out.
Otherwise Outrage away and destroy their team. ;)