r355514 - Reland "[Remarks] Refactor remark diagnostic emission in a RemarkStreamer"
Francis Visoiu Mistrih via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 6 07:20:13 PST 2019
Author: thegameg
Date: Wed Mar 6 07:20:13 2019
New Revision: 355514
URL: http://llvm.org/viewvc/llvm-project?rev=355514&view=rev
Log:
Reland "[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
Original llvm-svn: 355507
Modified:
cfe/trunk/lib/CodeGen/CodeGenAction.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenAction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenAction.cpp?rev=355514&r1=355513&r2=355514&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenAction.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenAction.cpp Wed Mar 6 07:20:13 2019
@@ -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);
More information about the cfe-commits
mailing list