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 /clang/lib/CodeGen/CodeGenAction.cpp | |
parent | 1bdc2d1874e7035f86e5b9e3d3a6b005f27b8224 (diff) | |
download | bcm5719-llvm-9052f50cb4c927fd316bb41b17a950d182c9b945.tar.gz bcm5719-llvm-9052f50cb4c927fd316bb41b17a950d182c9b945.zip |
[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 'clang/lib/CodeGen/CodeGenAction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenAction.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index 0b631f72e6e..f59adcd3fb9 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/lib/CodeGen/CodeGenAction.cpp @@ -30,6 +30,7 @@ #include "llvm/IR/GlobalValue.h" #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Module.h" +#include "llvm/IR/RemarkStreamer.h" #include "llvm/IRReader/IRReader.h" #include "llvm/Linker/Linker.h" #include "llvm/Pass.h" @@ -276,8 +277,8 @@ namespace clang { return; } - Ctx.setDiagnosticsOutputFile( - llvm::make_unique<yaml::Output>(OptRecordFile->os())); + Ctx.setRemarkStreamer(llvm::make_unique<RemarkStreamer>( + CodeGenOpts.OptRecordFile, OptRecordFile->os())); if (CodeGenOpts.getProfileUse() != CodeGenOptions::ProfileNone) Ctx.setDiagnosticsHotnessRequested(true); |