1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00

Print newline after banner for ModulePass

Before this commit, `llc -print-after-all` would print something like:

  *** IR Dump After Pre-ISel Intrinsic Lowering ***; ModuleID = ...

Emit a newline such that ModuleID appears on a line by its own.

llvm-svn: 346844
This commit is contained in:
Sven van Haastregt 2018-11-14 10:05:28 +00:00
parent 586ba5447b
commit 50bd8e4bd3
2 changed files with 4 additions and 1 deletions

View File

@ -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 {

View File

@ -10,10 +10,12 @@ define void @foo(){
ret void
}
;ALL-NOT: IR Dump After {{.*}}; ModuleID =
;ALL: define void @tester()
;ALL: define void @foo()
;ALL: ModuleID =
;FOO: IR Dump After
;FOO-EMPTY:
;FOO-NEXT: define void @foo()
;FOO-NOT: define void @tester