SMB vs. Sunfish: Two very different targets and getting a definite answer is very... subjective
I mostly fish warm water, so those are what I'm frequently after and they are at different ends of the warm water spectrum spectrum.
I'd buy an 8 wt and a cheapo 3-4 wt rod. Here's why/what:
IA said it well - get a 3/4 for sunfish. A suggestion is get the EagleClaw Featherlight 3/4 for targeting sunfish. Since you're talking about 1 rod for both, I assume you're on a budget. At about $30 it's cheap and is a blast to cast. Someone tell me a better 3-4 wt. economy rod!?
If you want to go after smallies, then get a 7wt at least. An 8wt would be ideal because you could target pretty much all bass on it. There are a number of great 8wt's you can choose on the market today at a great price. There's a reason 8's are such a popular selling weight today... they are extremely versatile, and because of that, everyone is making great ones at an affordable price.
Personally, I own the featherlight and it's a blast for sunfish. I use a few 8's for my bass needs, with my favorite being a Mystic Inception because it casts great and is $130! Having 1 of each would be perfect, but I can't see 1 rod fitting both needs.