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...