Separate the remark serialization to YAML from the LLVM Diagnostics.
This adds a new serialization abstraction: remarks::Serializer. It's
completely independent from lib/IR and it provides an easy way to
replace YAML by providing a new remarks::Serializer.
Differential Revision: https://reviews.llvm.org/D62632
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@362160
91177308-0d34-0410-b5e6-
96231b3b80d8
}
Ctx.setRemarkStreamer(llvm::make_unique<RemarkStreamer>(
- CodeGenOpts.OptRecordFile, OptRecordFile->os()));
+ CodeGenOpts.OptRecordFile,
+ llvm::make_unique<remarks::YAMLSerializer>(OptRecordFile->os())));
if (!CodeGenOpts.OptRecordPasses.empty())
if (Error E = Ctx.getRemarkStreamer()->setFilter(