summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/IRPrintingPasses.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/IRPrintingPasses.cpp')
-rw-r--r--llvm/lib/IR/IRPrintingPasses.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/IR/IRPrintingPasses.cpp b/llvm/lib/IR/IRPrintingPasses.cpp
index befe1d9ffb1..43010220b9f 100644
--- a/llvm/lib/IR/IRPrintingPasses.cpp
+++ b/llvm/lib/IR/IRPrintingPasses.cpp
@@ -27,7 +27,8 @@ PrintModulePass::PrintModulePass(raw_ostream &OS, const std::string &Banner,
ShouldPreserveUseListOrder(ShouldPreserveUseListOrder) {}
PreservedAnalyses PrintModulePass::run(Module &M, ModuleAnalysisManager &) {
- OS << Banner;
+ if (!Banner.empty())
+ OS << Banner << "\n";
if (llvm::isFunctionInPrintList("*"))
M.print(OS, nullptr, ShouldPreserveUseListOrder);
else {
OpenPOWER on IntegriCloud