The IRS matches names based on the database from the Social Security Administration. So you should file with whatever name the Social Security Administration uses.
However, if the name was changed after November, it is difficult to know what name to use. Years ago, the IRS took the database in December and used that for the year. However, it is quite possible that the IRS keeps up with the updates now throughout the year, so I'm not sure.