I believe this is not a right place for a fix.
Banner in some cases is just a prefix for a full banner line
(see PrintFunctionPass::run, handling for forcePrintModuleIR).
So the right way to fix is to add \n in a couple of places where it is still missing
(say, in PrintFunctionPass::run, else branch of forcePrintModuleIR condition).