Bactrim

Anyone take bactrim in pregnancy ? I cant remember if I did in Previous pregnancy’s . It Says on the bottle do not take if your pregnant! It’s a class c and a on call doctor give it to me