[IR] Keep a double break between functions when printing a module
authorReid Kleckner <rnk@google.com>
Mon, 27 Jan 2020 21:49:09 +0000 (13:49 -0800)
committerReid Kleckner <rnk@google.com>
Mon, 27 Jan 2020 23:31:09 +0000 (15:31 -0800)
commit9521c18438a9f09663f3dc68aa7581371c0653c9
treee38aeb3014b4df837c3200d915516b9a3e2cc9ea
parentc7feb6b36aa8dac3cd20ffb9ad5980693ea9916e
[IR] Keep a double break between functions when printing a module

This behavior appears to have changed unintentionally in
b0e979724f2679e4e6f5b824144ea89289bd6d56.

Instead of printing the leading newline in printFunction, print it when
printing a module. This ensures that `OS << *Func` starts printing
immediately on the current line, but whole modules are printed nicely.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D73505
llvm/lib/IR/AsmWriter.cpp
llvm/test/Feature/undefined.ll