From c3bea8720a8359effcda45ae944529f3fa922619 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Fri, 28 Dec 2018 09:58:24 -0800 Subject: [PATCH] Use unique names for each LLVM IR dump MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Previously this would just repeatedly overwrite the one file, which makes it difficult to see what's happening when you compile a pipeline that needs 3 routines. Change-Id: Ibab115f5ccbb17333d504e4e7948be54ca304f9d Bug: b/123193054 Reviewed-on: https://swiftshader-review.googlesource.com/c/23469 Reviewed-by: Alexis Hétu Tested-by: Chris Forbes --- src/Reactor/LLVMReactor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Reactor/LLVMReactor.cpp b/src/Reactor/LLVMReactor.cpp index 8b4dcc00d..344fe52e8 100644 --- a/src/Reactor/LLVMReactor.cpp +++ b/src/Reactor/LLVMReactor.cpp @@ -911,7 +911,7 @@ namespace rr #else std::error_code error; #endif - llvm::raw_fd_ostream file("llvm-dump-unopt.txt", error); + llvm::raw_fd_ostream file(std::string(name) + "-llvm-dump-unopt.txt", error); ::module->print(file, 0); } @@ -927,7 +927,7 @@ namespace rr #else std::error_code error; #endif - llvm::raw_fd_ostream file("llvm-dump-opt.txt", error); + llvm::raw_fd_ostream file(std::string(name) + "-llvm-dump-opt.txt", error); ::module->print(file, 0); } -- 2.11.0