diff options
author | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2019-03-06 14:32:08 +0000 |
---|---|---|
committer | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2019-03-06 14:32:08 +0000 |
commit | 9052f50cb4c927fd316bb41b17a950d182c9b945 (patch) | |
tree | f9a7d882186ba715e0b4a2478d9099c6c26f758e /llvm/lib/LTO/LTO.cpp | |
parent | 1bdc2d1874e7035f86e5b9e3d3a6b005f27b8224 (diff) | |
download | llvm-9052f50cb4c927fd316bb41b17a950d182c9b945.zip llvm-9052f50cb4c927fd316bb41b17a950d182c9b945.tar.gz llvm-9052f50cb4c927fd316bb41b17a950d182c9b945.tar.bz2 |
[Remarks] Refactor remark diagnostic emission in a RemarkStreamer
This allows us to store more info about where we're emitting the remarks
without cluttering LLVMContext. This is needed for future support for
the remark section.
Differential Revision: https://reviews.llvm.org/D58996
llvm-svn: 355507
Diffstat (limited to 'llvm/lib/LTO/LTO.cpp')
-rw-r--r-- | llvm/lib/LTO/LTO.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp index 8e0d532..f6e34c5 100644 --- a/llvm/lib/LTO/LTO.cpp +++ b/llvm/lib/LTO/LTO.cpp @@ -24,6 +24,7 @@ #include "llvm/IR/LegacyPassManager.h" #include "llvm/IR/Mangler.h" #include "llvm/IR/Metadata.h" +#include "llvm/IR/RemarkStreamer.h" #include "llvm/LTO/LTOBackend.h" #include "llvm/LTO/SummaryBasedOptimizations.h" #include "llvm/Linker/IRMover.h" @@ -1326,8 +1327,8 @@ lto::setupOptimizationRemarks(LLVMContext &Context, llvm::make_unique<ToolOutputFile>(Filename, EC, sys::fs::F_None); if (EC) return errorCodeToError(EC); - Context.setDiagnosticsOutputFile( - llvm::make_unique<yaml::Output>(DiagnosticFile->os())); + Context.setRemarkStreamer( + llvm::make_unique<RemarkStreamer>(Filename, DiagnosticFile->os())); DiagnosticFile->keep(); return std::move(DiagnosticFile); } |