Codeine in cough syrup is generally used for its cough suppressing properties. Pain relief is just a nice add on.
Did you try and ibuprofen or aleeve? Those have anti-inflammatory actions and will help relieve the pain as well as the swelling.
Can you touch your chin to your chest? If you can't because it's to painful that may be a sign of meningitis and you might want to be letting your doctor know about that.